elasticsearch
Python client for Elasticsearch
Decision gist · record as of 2026-08-14
Yes. This is the official, actively maintained client with low install friction, no known vulnerabilities, permissive licensing, and broad Python version support (3.10+). It is the standard choice for any Python application that needs to interact with Elasticsearch.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a running Elasticsearch server accessible at the specified host and port.
- Low friction install with five stable runtime dependencies.
- Actively maintained with recent release 10 days old.
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing free use, modification, and distribution in both open-source and proprietary projects with minimal restrictions.
last release 2026-08-04 (10 days) · last repo commit 2026-08-13 · 4,385 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 55,673,594 downloads/mo, #533 on PyPI
Alternatives
Verify before relying
pip install elasticsearch
from elasticsearch import Elasticsearch
client = Elasticsearch(["http://localhost:9200"])
response = client.search(index="my-index", query={"match_all": {}})- Whether the pluggable architecture and helper functions cover common Elasticsearch use patterns without additional wrapper libraries
- Performance characteristics under high-volume indexing or search workloads
What it is and what it does
The elasticsearch package is the official Python client for Elasticsearch. It abstracts away the HTTP protocol layer, providing Python methods to create indices, index documents, search, update, and delete data in Elasticsearch clusters. The client handles connection pooling, automatic node discovery, load balancing across available nodes, TLS and HTTP authentication, and thread-safe concurrent requests.
Typical usage involves instantiating a client with connection details, then calling methods that correspond to Elasticsearch REST API operations. The package translates Python data types to JSON and back, manages persistent connections with failed-node penalization, and supports pluggable strategies for node selection and connection handling. It works with Elasticsearch 8.x and 9.x versions, with forward compatibility guarantees for minor version upgrades.
Use it for
- Building search functionality into Python applications that need full-text search, filtering, and aggregation over large datasets
- Indexing and managing documents in Elasticsearch from Python batch jobs or ETL pipelines
- Querying Elasticsearch for analytics, logging, or monitoring data in production applications
- Implementing automatic node discovery and failover across multi-node Elasticsearch clusters
- Developing Python-based tools that interact with Elasticsearch APIs while maintaining thread safety in concurrent environments
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, no known vulnerabilities, permissive licensing, and broad Python version support (3.10+). It is the standard choice for any Python application that needs to interact with Elasticsearch.
Install
elasticsearch on PyPI
Before you install
Low friction install with five stable runtime dependencies. Actively maintained with recent release 10 days old. Supports current Python versions and has 4385 repository stars.
Requires a running Elasticsearch server accessible at the specified host and port.
License in practice
Licensed under Apache-2.0 (permissive), allowing free use, modification, and distribution in both open-source and proprietary projects with minimal restrictions.
Quickstart
pip install elasticsearch
from elasticsearch import Elasticsearch
client = Elasticsearch(["http://localhost:9200"])
response = client.search(index="my-index", query={"match_all": {}})
Verify before relying
- Whether the pluggable architecture and helper functions cover common Elasticsearch use patterns without additional wrapper libraries
- Performance characteristics under high-volume indexing or search workloads
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 |
| Last repo commit | |
| First released | |
| Downloads | 55,673,594 / month, #533 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: elasticsearch-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 Front-Ends packages
SQLAlchemy is a Python SQL toolkit and Object Relational Mapper (ORM) that provides both a high-level ORM layer for declarative object persistence and a Core SQL construction system for direct database abstraction and query building.
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.
Alembic generates and manages database schema migrations for SQLAlchemy applications, handling version control of database structure changes with support for upgrades, downgrades, and auto-generation from model changes.
Install it if you use SQLAlchemy and need to version-control schema changes; skip it only if you manage migrations manually or use a different ORM entirely.
A Python client library for connecting to and querying Weaviate, a vector database that enables semantic search and AI-powered data retrieval.
A Python client library that connects to Databricks clusters and SQL warehouses using a Thrift-based protocol, conforming to the Python DB API 2.0 specification and supporting Arrow-based data exchange.
Install it if you need to query Databricks clusters or SQL warehouses from Python.
Psycopg 3 is a PostgreSQL database adapter for Python that enables applications to connect to, query, and manage PostgreSQL databases using Python code.
Install it if you need to connect Python to PostgreSQL.
See also elasticsearch7 · elasticsearch9 · es-client · elastic-transport · elasticsearch6 · elasticsearch-dsl · elasticsearch8-dsl · elasticsearch5 · pysolr · django-elasticsearch-dsl