django-elasticsearch-dsl
Wrapper around elasticsearch-dsl-py for django models
What it is and what it does
Django Elasticsearch DSL is a wrapper around elasticsearch-py that automates indexing of Django model instances into Elasticsearch. It handles the mapping of Django model fields to Elasticsearch field types, provides Django signal receivers to keep indices synchronized when models are saved or deleted, and exposes management commands for index lifecycle operations (create, delete, rebuild, populate). The package supports complex field types like ObjectField and NestedField, and includes parallel indexing for performance.
The library is designed for developers who need full-text search or advanced querying capabilities in Django applications. It abstracts away much of the boilerplate around document definition and synchronization while still exposing the full elasticsearch-py Search API for complex queries. Version compatibility is strict: you must use the major version of the library that matches your Elasticsearch server version.
Use it for:
- Add full-text search to a Django application by automatically indexing model instances and querying them via Elasticsearch
- Keep a search index synchronized with a Django database using automatic signal handlers on model save and delete
- Rebuild or repopulate Elasticsearch indices using management commands when schema or data changes
- Map complex Django field types (including nested and object fields) to Elasticsearch mappings without manual configuration
- Speed up large-scale indexing operations using parallel indexing during initial index population
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Indexes Django model instances into Elasticsearch and keeps them synchronized, providing a thin wrapper around elasticsearch-py for querying and managing search indices.
Yes, if you need Elasticsearch integration with Django and are running Django 4.2+ with Python 3.9+. The low install friction, permissive license, and active repository make it a solid choice. However, verify that your Elasticsearch server version matches the library's major version, and check recent commits to confirm the package still meets your needs given the aging maintenance status.
Install
django-elasticsearch-dsl on PyPI
pip
pip install django-elasticsearch-dsluv
uv add django-elasticsearch-dslpoetry
poetry add django-elasticsearch-dslInstalling django-elasticsearch-dsl
Before you install
Low install friction with only two runtime dependencies (elasticsearch and six). Maintenance status is aging—last release was 387 days ago—but the repository remains active with recent commits and no archived status.
License in practice
Licensed under Apache Software License 2.0, a permissive license that allows commercial use, modification, and distribution with minimal restrictions.
Quickstart
pip install django-elasticsearch-dsl
from django_elasticsearch_dsl import Document, Index
class MyDocument(Document):
class Index:
name = 'my-index'
# Sync with Django signals automatically on save/delete
Requires Django >= 4.2, Python 3.9+, and a running Elasticsearch instance matching the library's major version
Verify before relying
- Whether version 9.0 of this package is compatible with Elasticsearch 9.0+ as the description suggests
- Current development activity and whether the aging maintenance status reflects active ongoing support
Package facts
| License | Apache Software License 2.0 (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — elasticsearch, six |
| Maintenance | aging — 387 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 496,986/month — #6,334 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: django_elasticsearch_dsl-9.0-py2.py3-none-any.whl
Keywords: django, elasticsearch, elasticsearch-dsl
Tags
More Front-Ends packages
SQLAlchemy is a Python SQL toolkit and Object…
permissive · top 100 on PyPI
psycopg2-binarypsycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
alembicAlembic generates and manages database schema…
permissive · top 1,000 on PyPI
weaviate-clientA Python client library for connecting to and…
permissive · top 1,000 on PyPI
databricks-sql-connectorA Python client library that connects to…
permissive · top 1,000 on PyPI
psycopgPsycopg 3 is a PostgreSQL database adapter for…
copyleft · top 1,000 on PyPI
django-elasticsearch-dsl-drfProvides Django REST framework views,…
copyleft · top 15,000 on PyPI
elasticsearch-curatorManages Elasticsearch indices and snapshots…
permissive · top 15,000 on PyPI
elasticsearch-dslProvides a high-level Python API for building…
permissive · top 5,000 on PyPI
modelsearchIndexes Django models into Elasticsearch,…
permissive · top 15,000 on PyPI
django-opensearch-dslIndexes Django model instances into OpenSearch…
permissive · top 15,000 on PyPI
elasticsearch8-dslA high-level Python query builder for…
permissive · top 15,000 on PyPI
luqumParses Lucene Query DSL syntax into an abstract…
unclear · top 5,000 on PyPI
typesensePython client library for Typesense search…
permissive · top 5,000 on PyPI
elasticsearchOfficial Python client library for connecting…
permissive · top 1,000 on PyPI
algoliasearch-djangoIntegrates Algolia's hosted search service into…
permissive · top 5,000 on PyPI