opensearch-dsl
Python client for OpenSearch
What it is and what it does
opensearch-dsl-py is a high-level Python client for OpenSearch that provides a domain-specific language for constructing and executing queries. It wraps opensearch-py and offers an object-oriented interface for building complex search queries, filters, and aggregations against OpenSearch clusters.
The package is now deprecated and abandoned. The maintainers explicitly recommend switching to opensearch-py, which has absorbed the DSL functionality. It depends on six, python-dateutil, opensearch-py, and ipaddress, and supports Python 2.7 and Python 3.4 through 3.9. The repository is archived and has not received updates since January 2024.
Use it for:
- Building OpenSearch queries programmatically using a Pythonic DSL instead of raw JSON.
- Mapping Python objects to OpenSearch documents with automatic serialization and deserialization.
- Constructing aggregations and filters in a readable way for search applications.
- Maintaining legacy systems that already depend on opensearch-dsl-py.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python client library for building and executing queries against OpenSearch using a domain-specific language interface built on top of opensearch-py.
No. The package is explicitly deprecated and abandoned as of version 2.1.0, with the maintainers recommending migration to opensearch-py. Unless you are maintaining legacy code that already depends on it, you should use opensearch-py directly instead. Starting new projects with this package is not advisable.
Install
opensearch-dsl on PyPI
pip
pip install opensearch-dsluv
uv add opensearch-dslpoetry
poetry add opensearch-dslInstalling opensearch-dsl
Before you install
Low install friction with a pure-Python wheel distribution. However, the package is abandoned as of version 2.1.0 (last release 2023-03-21, last commit 2024-01-18, repository archived); the maintainers explicitly recommend migrating to opensearch-py instead.
License in practice
Licensed under Apache-2.0 (permissive), so commercial use and modification are permitted without restriction, though you should review the license terms if redistribution is planned.
Quickstart
pip install opensearch-dsl==2.1.0
from opensearch_dsl import Search
from opensearch_py import OpenSearch
client = OpenSearch()
s = Search(using=client, index='my_index')
results = s.execute()
Requires a running OpenSearch cluster. The package is abandoned and not recommended for new projects.
Verify before relying
- Whether opensearch-py now fully replaces the DSL functionality or if specific use cases still require this package.
- Compatibility with OpenSearch versions released after the package's final release in March 2023.
- Whether the deprecated package will receive security updates or bug fixes.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — six, python-dateutil, opensearch-py, ipaddress |
| Maintenance | abandoned — 1,242 days since the last release |
| Last repo commit | (repository archived) |
| First released | |
| Downloads | 702,269/month — #5,285 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: opensearch_dsl-2.1.0-py2.py3-none-any.whl
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
django-opensearch-dslIndexes Django model instances into OpenSearch…
permissive · top 15,000 on PyPI
opensearch-pyPython client library for connecting to and…
permissive · top 1,000 on PyPI
elasticsearch-dslProvides a high-level Python API for building…
permissive · top 5,000 on PyPI
opensearch-loggerProvides a Python logging handler that sends…
permissive · top 15,000 on PyPI
opensearch-mcp-server-pyProvides a Model Context Protocol (MCP) server…
permissive · top 15,000 on PyPI
elasticsearch8-dslA high-level Python query builder for…
permissive · top 15,000 on PyPI
apache-airflow-providers-opensearchIntegrates OpenSearch with Apache Airflow,…
permissive · top 15,000 on PyPI
elasticsearch-dbapiProvides DBAPI (PEP-249) and SQLAlchemy dialect…
permissive · top 5,000 on PyPI
wolframalphaProvides a Python client for querying the…
permissive · top 15,000 on PyPI
yaqlYAQL is an embeddable query language for Python…
permissive · top 15,000 on PyPI