elasticsearch9
Python client for Elasticsearch
Decision gist · record as of 2026-08-14
Yes. This is the official, actively maintained client with low install friction, permissive licensing, no known vulnerabilities, and broad Python version support. Install it if you need to interact with Elasticsearch from Python—it is the standard choice for this task.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- Elasticsearch server must be running and accessible at the configured host and port.
- Low friction install with five runtime dependencies (anyio, elastic-transport, python-dateutil, sniffio, typing-extensions).
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache 2.0 (permissive). You can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
last release 2026-08-04 (10 days)
0 known vulnerabilities (OSV.dev, 2026-08-14) · 172,836 downloads/mo, #10,322 on PyPI
Alternatives
Verify before relying
pip install elasticsearch9
from elasticsearch9 import Elasticsearch
client = Elasticsearch(["http://localhost:9200"])
result = client.search(index="my_index", query={"match_all": {}})- Whether elasticsearch9 is a separate major version branch or an alias for the main elasticsearch package
- Performance characteristics and connection pooling behavior under high concurrency
- Exact feature parity between elasticsearch9 and Elasticsearch 9.x server versions
What it is and what it does
elasticsearch9 is the official Python client library for Elasticsearch, maintained by Elastic. It provides a high-level interface to interact with Elasticsearch clusters, handling the low-level HTTP communication, connection pooling, node discovery, and load balancing automatically. The client translates Python data types to JSON, manages persistent connections with automatic retry logic, and supports TLS and HTTP authentication out of the box.
Typical usage involves creating a client instance pointing to your Elasticsearch cluster, then calling methods to index documents, search, update, delete, or manage indices. The library is thread-safe and designed to be pluggable—you can customize connection strategies, node selection, and other behaviors. It works with current Python versions (3.10 through 3.14) and is forward-compatible with later minor versions of Elasticsearch.
Use it for
- Index and search documents in an Elasticsearch cluster from a Python application
- Build a search interface or analytics dashboard that queries Elasticsearch data
- Manage index lifecycle operations (create, update, delete indices) programmatically
- Implement full-text search, faceting, and aggregations in a Python backend
- Migrate or bulk-load data into Elasticsearch from Python scripts
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
This is the official, actively maintained client with low install friction, permissive licensing, no known vulnerabilities, and broad Python version support. Install it if you need to interact with Elasticsearch from Python—it is the standard choice for this task.
Install
elasticsearch9 on PyPI
Before you install
Low friction install with five runtime dependencies (anyio, elastic-transport, python-dateutil, sniffio, typing-extensions). Actively maintained with a release 10 days ago; supports current Python versions (3.10–3.14).
Requires Python 3.10 or later. Elasticsearch server must be running and accessible at the configured host and port.
License in practice
Licensed under Apache 2.0 (permissive). You can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install elasticsearch9
from elasticsearch9 import Elasticsearch
client = Elasticsearch(["http://localhost:9200"])
result = client.search(index="my_index", query={"match_all": {}})
Verify before relying
- Whether elasticsearch9 is a separate major version branch or an alias for the main elasticsearch package
- Performance characteristics and connection pooling behavior under high concurrency
- Exact feature parity between elasticsearch9 and Elasticsearch 9.x server versions
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 5 packagesanyioelastic-transportpython-dateutilsniffiotyping-extensions |
| Maintenance | Actively maintained 10 days since the last release |
| First released | |
| Downloads | 172,836 / month, #10,322 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPy |
Evidence: elasticsearch9-9.5.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
An agent finds packages by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language. Give your agent the search over MCP.
More Database packages
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.
Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.
YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.
Install it if you need to connect Python applications to YDB databases.
Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.
sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.
Install it if you need to manipulate, format, or analyze SQL text programmatically.
Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.
See also elasticsearch · elasticsearch7 · es-client · elastic-transport · elasticsearch5 · elasticsearch8-dsl · elasticsearch-dsl · elasticsearch6 · elasticsearch-curator · pysolr