skillfed

django-elasticsearch-dsl

Wrapper around elasticsearch-dsl-py for django models

django-elasticsearch-dsl v9.0 497.0K downloads/30d#6,334 on PyPI1,056
Permissive license Apache Software License 2.0 AGING released

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-dsl

uv

uv add django-elasticsearch-dsl

poetry

poetry add django-elasticsearch-dsl

Installing 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

Development Status :: 3 - AlphaFramework :: DjangoFramework :: Django :: 4.2Framework :: Django :: 5.0Framework :: Django :: 5.1Framework :: Django :: 5.2Intended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9

Tags

django elasticsearch indexingelasticsearch dsl django modelsdjango search index syncelasticsearch document mappingdjango model full-text search
django-integrationsearch-indexing

More Front-Ends packages

SQLAlchemy

SQLAlchemy is a Python SQL toolkit and Object…

permissive · top 100 on PyPI

psycopg2-binary

psycopg2-binary is a PostgreSQL database…

copyleft · top 1,000 on PyPI

alembic

Alembic generates and manages database schema…

permissive · top 1,000 on PyPI

weaviate-client

A Python client library for connecting to and…

permissive · top 1,000 on PyPI

databricks-sql-connector

A Python client library that connects to…

permissive · top 1,000 on PyPI

psycopg

Psycopg 3 is a PostgreSQL database adapter for…

copyleft · top 1,000 on PyPI

django-elasticsearch-dsl-drf

Provides Django REST framework views,…

copyleft · top 15,000 on PyPI

elasticsearch-curator

Manages Elasticsearch indices and snapshots…

permissive · top 15,000 on PyPI

elasticsearch-dsl

Provides a high-level Python API for building…

permissive · top 5,000 on PyPI

modelsearch

Indexes Django models into Elasticsearch,…

permissive · top 15,000 on PyPI

django-opensearch-dsl

Indexes Django model instances into OpenSearch…

permissive · top 15,000 on PyPI

elasticsearch8-dsl

A high-level Python query builder for…

permissive · top 15,000 on PyPI

luqum

Parses Lucene Query DSL syntax into an abstract…

unclear · top 5,000 on PyPI

typesense

Python client library for Typesense search…

permissive · top 5,000 on PyPI

elasticsearch

Official Python client library for connecting…

permissive · top 1,000 on PyPI

algoliasearch-django

Integrates Algolia's hosted search service into…

permissive · top 5,000 on PyPI