django-elasticsearch-dsl-drf
Integrate Elasticsearch DSL with Django REST framework.
Decision gist · record as of 2026-08-14
Yes, with conditions. The package is stable and well-documented for integrating Elasticsearch with Django REST framework, with no known vulnerabilities. However, maintenance is dormant (last release 2022-07-03), so it is best suited for projects on Django 2.2, 3.1, or 3.2 and Elasticsearch 6.x or 7.x that do not require active support. If you need compatibility with newer versions, verify compatibility first or consider alternatives.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Elasticsearch 6.x or 7.x running and accessible; Django 2.2, 3.1, or 3.2; Python 3.6, 3.7, 3.8, or 3.9.
- Low friction install with six runtime dependencies.
- Maintenance is dormant—last release was 2022-07-03, though the repository remains active with a recent commit on 2024-08-10.
License · maintenance · safety
copyleft license (copyleft) — Dual-licensed under GPL-2.0-only or LGPL-2.1-or-later (copyleft). Use requires compliance with one of these licenses; derivative works or distribution must include source code and license terms.
last release 2022-07-03 (1503 days) · last repo commit 2024-08-10 · 379 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 138,983 downloads/mo, #11,313 on PyPI
Alternatives
Verify before relying
pip install django-elasticsearch-dsl-drf
# In Django settings.py, add to INSTALLED_APPS:
# 'rest_framework', 'django_elasticsearch_dsl', 'django_elasticsearch_dsl_drf'
from django_elasticsearch_dsl_drf.viewsets import DocumentViewSet
from django_elasticsearch_dsl_drf.serializers import DocumentSerializer
class MyDocumentViewSet(DocumentViewSet):
serializer_class = DocumentSerializer- Whether the package works with Elasticsearch 8.x or later versions beyond 7.x.
- Current compatibility with Python 3.10+ and Django 4.0+.
- Whether dormant status means security patches are still applied or if vulnerabilities would go unaddressed.
What it is and what it does
django-elasticsearch-dsl-drf bridges Elasticsearch DSL and Django REST framework, letting you expose Elasticsearch documents as REST API endpoints without writing boilerplate views or serializers. It provides pre-built filter backends for search, ordering, filtering, geo-spatial queries, faceting, and highlighting, plus pagination and aggregation support. You define your Elasticsearch documents using django-elasticsearch-dsl, then use this package's viewsets and serializers to turn them into queryable REST endpoints.
The package handles the integration layer between two mature ecosystems: it takes your Elasticsearch document definitions and automatically generates REST-compatible serializers, then provides filter backends that translate query parameters into Elasticsearch DSL queries. This is useful when you want full-text search, complex filtering, or faceted navigation in a Django REST API without manually translating HTTP requests into Elasticsearch queries.
Use it for
- Build a full-text search API endpoint that accepts query strings and returns ranked results with highlighting.
- Create a product catalog API with faceted filtering by category, price range, and geo-spatial distance.
- Expose Elasticsearch aggregations as REST endpoints for analytics dashboards or reporting.
- Implement auto-complete or suggestion endpoints using Elasticsearch suggesters.
- Add complex filtering (range, prefix, wildcard, exists) to a Django REST API without custom query logic.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
The package is stable and well-documented for integrating Elasticsearch with Django REST framework, with no known vulnerabilities. However, maintenance is dormant (last release 2022-07-03), so it is best suited for projects on Django 2.2, 3.1, or 3.2 and Elasticsearch 6.x or 7.x that do not require active support. If you need compatibility with newer versions, verify compatibility first or consider alternatives.
Install
django-elasticsearch-dsl-drf on PyPI
Before you install
Low friction install with six runtime dependencies. Maintenance is dormant—last release was 2022-07-03, though the repository remains active with a recent commit on 2024-08-10. Suitable for stable use cases but expect no active development.
Requires Elasticsearch 6.x or 7.x running and accessible; Django 2.2, 3.1, or 3.2; Python 3.6, 3.7, 3.8, or 3.9.
License in practice
Dual-licensed under GPL-2.0-only or LGPL-2.1-or-later (copyleft). Use requires compliance with one of these licenses; derivative works or distribution must include source code and license terms.
Quickstart
pip install django-elasticsearch-dsl-drf
# In Django settings.py, add to INSTALLED_APPS:
# 'rest_framework', 'django_elasticsearch_dsl', 'django_elasticsearch_dsl_drf'
from django_elasticsearch_dsl_drf.viewsets import DocumentViewSet
from django_elasticsearch_dsl_drf.serializers import DocumentSerializer
class MyDocumentViewSet(DocumentViewSet):
serializer_class = DocumentSerializer
Verify before relying
- Whether the package works with Elasticsearch 8.x or later versions beyond 7.x.
- Current compatibility with Python 3.10+ and Django 4.0+.
- Whether dormant status means security patches are still applied or if vulnerabilities would go unaddressed.
Package facts
| License | copyleft license copyleft |
| Python support | Supports the current Python release >=2.7 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagessixdjango-ninedjango-elasticsearch-dslelasticsearch-dslelasticsearchdjangorestframework |
| Maintenance | Dormant 1,503 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 138,983 / month, #11,313 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: Web EnvironmentFramework :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: GNU General Public License v2 (GPLv2)License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)Operating System :: OS IndependentProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9 |
Evidence: django_elasticsearch_dsl_drf-0.22.5-py2.py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “elasticsearch rest api django”
- django-elasticsearch-dsl-drfProvides Django REST framework views, serializers, and filter…
- django-elasticsearch-dslIndexes Django model instances into Elasticsearch and keeps them…
- django-haystackHaystack provides a unified search API for Django that lets you swap…
Give your agent the search over MCP, or paste the wish link into any chat.
More Dynamic Content packages
MarkupSafe provides a text object that escapes special characters so untrusted strings can be safely embedded in HTML and XML without injection attacks.
Jinja2 is a templating engine that renders dynamic content by combining templates with Python-like syntax and data, supporting template inheritance, macros, autoescaping, and sandboxed execution.
Soupsieve is a CSS selector library designed to work with Beautiful Soup 4 to select, match, and filter HTML and XML elements using modern CSS selectors from CSS level 1 through CSS level 4 specifications.
Install it if you use Beautiful Soup for HTML or XML parsing and want modern CSS selector support.
Werkzeug is a WSGI utility library providing request/response objects, URL routing, an interactive debugger, HTTP utilities, and a development server for building web applications.
Flask is a lightweight WSGI web application framework for building web applications in Python, from simple single-page sites to complex multi-route applications.
Mako compiles Python-embedded templates into Python modules for fast rendering, supporting layout inheritance, custom functions, and direct Python expressions within template syntax.
See also django-elasticsearch-dsl · djangorestframework-datatables · elasticsearch-dsl · fastapi-filter · elasticsearch8-dsl · djangorestframework · drf-dynamic-fields · django-filter · django-haystack · djangorestframework-filters