{"id":21037434,"url":"https://github.com/vintasoftware/django-zombodb","last_synced_at":"2025-04-09T18:18:49.945Z","repository":{"id":34120364,"uuid":"168772360","full_name":"vintasoftware/django-zombodb","owner":"vintasoftware","description":"Easy Django integration with Elasticsearch through ZomboDB Postgres Extension","archived":false,"fork":false,"pushed_at":"2022-12-28T15:24:24.000Z","size":602,"stargazers_count":150,"open_issues_count":23,"forks_count":10,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-04-09T18:18:45.558Z","etag":null,"topics":["django","elasticsearch","postgresql","zombodb"],"latest_commit_sha":null,"homepage":"https://django-zombodb.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vintasoftware.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.rst","support":null}},"created_at":"2019-02-01T23:15:22.000Z","updated_at":"2025-02-18T22:24:31.000Z","dependencies_parsed_at":"2023-01-15T04:44:13.430Z","dependency_job_id":null,"html_url":"https://github.com/vintasoftware/django-zombodb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Fdjango-zombodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Fdjango-zombodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Fdjango-zombodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vintasoftware%2Fdjango-zombodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vintasoftware","download_url":"https://codeload.github.com/vintasoftware/django-zombodb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248085325,"owners_count":21045139,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","elasticsearch","postgresql","zombodb"],"created_at":"2024-11-19T13:26:13.805Z","updated_at":"2025-04-09T18:18:49.922Z","avatar_url":"https://github.com/vintasoftware.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"==============\ndjango-zombodb\n==============\n\n.. image:: https://badge.fury.io/py/django-zombodb.svg\n    :target: https://badge.fury.io/py/django-zombodb\n    :alt: PyPI Status\n\n.. image:: https://travis-ci.org/vintasoftware/django-zombodb.svg?branch=master\n    :target: https://travis-ci.org/vintasoftware/django-zombodb\n    :alt: Build Status\n\n.. image:: https://readthedocs.org/projects/django-zombodb/badge/?version=latest\n    :target: https://django-zombodb.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n\n.. image:: https://codecov.io/gh/vintasoftware/django-zombodb/branch/master/graph/badge.svg\n    :target: https://codecov.io/gh/vintasoftware/django-zombodb\n    :alt: Coverage Status\n\n.. image:: https://img.shields.io/github/license/vintasoftware/django-zombodb.svg\n    :alt: GitHub\n\nEasy Django integration with Elasticsearch through `ZomboDB \u003chttps://github.com/zombodb/zombodb\u003e`_ Postgres Extension.\nThanks to ZomboDB, **your Django models are synced with Elasticsearch at transaction time**! Searching is also very simple: you can make\nElasticsearch queries by just calling one of the search methods on your querysets. Couldn't be easier!\n\nDocumentation\n-------------\n\nThe full documentation is at `\u003chttps://django-zombodb.readthedocs.io\u003e`_.\n\n\nRequirements\n------------\n\n* **Python**: 3.5, 3.6, 3.7\n* **Django**: 2.0, 2.1, 2.2\n* **Postgres** and **Elasticsearch**: same as `ZomboDB current requirements \u003chttps://github.com/zombodb/zombodb#system-requirements\u003e`_\n\n\nQuickstart\n----------\n\n1. Install ZomboDB (instructions `here \u003chttps://github.com/zombodb/zombodb/blob/master/INSTALL.md\u003e`_)\n\n2. Install django-zombodb:\n\n::\n\n    pip install django-zombodb\n\n3. Add the ``SearchQuerySet`` and the ``ZomboDBIndex`` to your model:\n\n.. code-block:: python\n\n    from django_zombodb.indexes import ZomboDBIndex\n    from django_zombodb.querysets import SearchQuerySet\n\n    class Restaurant(models.Model):\n        name = models.TextField()\n\n        objects = models.Manager.from_queryset(SearchQuerySet)()\n\n        class Meta:\n            indexes = [\n                ZomboDBIndex(fields=[\n                    'name',\n                ]),\n            ]\n\n4. Make the migrations:\n\n::\n\n    python manage.py makemigrations\n\n5. Add ``django_zombodb.operations.ZomboDBExtension()`` as the first operation of the migration you've just created:\n\n.. code-block:: python\n\n    import django_zombodb.operations\n\n    class Migration(migrations.Migration):\n\n        dependencies = [\n            ('restaurants', '0001_initial'),\n        ]\n\n        operations = [\n            django_zombodb.operations.ZomboDBExtension(),  # \u003c\u003c\u003c here\n        ]\n\n6. Run the migrations (Postgres user must be SUPERUSER to create the ZomboDB extension):\n\n::\n\n    python manage.py migrate\n\n7. Done! Now you can make Elasticsearch queries directly from your model:\n\n.. code-block:: python\n\n    Restaurant.objects.filter(is_open=True).query_string_search(\"brazil* AND coffee~\")\n\nFull Example\n------------\n\nCheck `\u003chttps://github.com/vintasoftware/django-zombodb/tree/master/example\u003e`_\n\nRunning Tests\n-------------\n\nYou need to have Elasticsearch and Postgres instances running on default ports. Also, you need ZomboDB installed. Then just do:\n\n::\n\n    python runtests.py\n\nSecurity\n--------\n\nPlease check `SECURITY.rst \u003cSECURITY.rst\u003e`_.\nIf you found or if you think you found a vulnerability please get in touch via admin *AT* vinta.com.br\n\nPlease avoid disclosing any security issue on GitHub or any other public website. We'll work to swiftly address any possible vulnerability and give credit to reporters (if wanted).\n\n\nCommercial Support\n------------------\nThis project is maintained by `Vinta Software \u003chttps://www.vinta.com.br/?django-zombodb=1\u003e`_ and other contributors. We are always looking for exciting work, so if you need any commercial support, feel free to get in touch: contact@vinta.com.br\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvintasoftware%2Fdjango-zombodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvintasoftware%2Fdjango-zombodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvintasoftware%2Fdjango-zombodb/lists"}