skillfed

opensearch-dsl

Python client for OpenSearch

opensearch-dsl v2.1.0 702.3K downloads/30d#5,285 on PyPI40
Permissive license Apache-2.0 Abandoned released

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

uv

uv add opensearch-dsl

poetry

poetry add opensearch-dsl

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 2Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy

Tags

opensearch query builder pythonopensearch dsl clientpython opensearch queriesopensearch python ormopensearch search api pythonopensearch document mappingopensearch query dsl
deprecatedopensearchabandoned

More Database packages

psycopg2-binary

psycopg2-binary is a PostgreSQL database…

copyleft · top 1,000 on PyPI

redis

Python client library for connecting to and…

permissive · top 1,000 on PyPI

ydb

YDB Python SDK is the official client library…

permissive · top 1,000 on PyPI

snowflake-connector-python

Connects Python applications to Snowflake data…

permissive · top 1,000 on PyPI

sqlparse

sqlparse tokenizes SQL text into a tree of…

permissive · top 1,000 on PyPI

dbt-adapters

Provides base adapter protocols and shared…

permissive · top 1,000 on PyPI

django-opensearch-dsl

Indexes Django model instances into OpenSearch…

permissive · top 15,000 on PyPI

opensearch-py

Python client library for connecting to and…

permissive · top 1,000 on PyPI

elasticsearch-dsl

Provides a high-level Python API for building…

permissive · top 5,000 on PyPI

opensearch-logger

Provides a Python logging handler that sends…

permissive · top 15,000 on PyPI

opensearch-mcp-server-py

Provides a Model Context Protocol (MCP) server…

permissive · top 15,000 on PyPI

elasticsearch8-dsl

A high-level Python query builder for…

permissive · top 15,000 on PyPI

apache-airflow-providers-opensearch

Integrates OpenSearch with Apache Airflow,…

permissive · top 15,000 on PyPI

elasticsearch-dbapi

Provides DBAPI (PEP-249) and SQLAlchemy dialect…

permissive · top 5,000 on PyPI

wolframalpha

Provides a Python client for querying the…

permissive · top 15,000 on PyPI

yaql

YAQL is an embeddable query language for Python…

permissive · top 15,000 on PyPI