elasticsearch5
Python client for Elasticsearch
What it is and what it does
elasticsearch5 is the official low-level Python client for Elasticsearch 5.x. It provides a thin, opinion-free wrapper around the Elasticsearch REST API, handling connection pooling, automatic node discovery, load balancing across cluster nodes, and serialization of Python data types to JSON. The package includes features like persistent connections, thread safety, SSL/HTTP authentication support, and a pluggable architecture for customization.
This is a foundational library meant to be used directly for low-level cluster operations or as a base for higher-level abstractions. It has no external runtime dependencies, making installation straightforward. However, it is explicitly designed for Elasticsearch 5.x; if you are running a newer Elasticsearch version, you will need a different client package.
Use it for:
- Indexing and querying documents in an Elasticsearch 5.x cluster from Python applications.
- Managing indices, mappings, and cluster settings programmatically via the Elasticsearch API.
- Building custom search applications that need direct control over connection pooling and node selection.
- Integrating Elasticsearch into Python services that require thread-safe, persistent cluster communication.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Low-level Python client for Elasticsearch 5.x that handles connection management, request translation, and cluster communication with configurable load balancing and node discovery.
Yes, if you are running Elasticsearch 5.x and need a low-level Python client. The package is stable, permissively licensed, and has no external dependencies. However, if you are using a newer Elasticsearch version, do not install this—it will not work. If you need a higher-level query DSL, consider elasticsearch-dsl instead, which builds on top of this client.
Install
elasticsearch5 on PyPI
pip
pip install elasticsearch5uv
uv add elasticsearch5poetry
poetry add elasticsearch5Installing elasticsearch5
Before you install
Low install friction with no runtime dependencies. Repository is active with recent commits, though the package itself has not been updated since 2019 and targets the now-obsolete Elasticsearch 5.x series.
License in practice
Licensed under Apache License, Version 2.0 (permissive). You can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install elasticsearch5
from elasticsearch import Elasticsearch
es = Elasticsearch()
es.indices.create(index='my-index', ignore=400)
es.index(index='my-index', doc_type='test-type', id=42, body={'data': 'value'})
Requires a running Elasticsearch 5.x server; the package is designed for that version specifically and will not work with newer Elasticsearch releases.
Verify before relying
- Whether Elasticsearch 5.x is still in use in your environment or if you need a client for a newer Elasticsearch version.
- Current compatibility with modern Python versions beyond those listed in classifiers (2.6–3.6).
Package facts
| License | Apache License, Version 2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 2,635 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 77,932/month — #14,480 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: elasticsearch5-5.5.6-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
elasticsearch6Low-level Python client for Elasticsearch that…
permissive · top 15,000 on PyPI
elasticsearch7Official Python client for Elasticsearch that…
permissive · top 15,000 on PyPI
elasticsearch8-dslA high-level Python query builder for…
permissive · top 15,000 on PyPI
elasticsearch9Official Python client for Elasticsearch that…
permissive · top 15,000 on PyPI
elasticsearchOfficial Python client library for connecting…
permissive · top 1,000 on PyPI
elasticsearch-dslProvides a high-level Python API for building…
permissive · top 5,000 on PyPI
elastic-transportProvides shared HTTP transport classes and…
permissive · top 1,000 on PyPI
django-elasticsearch-dslIndexes Django model instances into…
permissive · top 15,000 on PyPI
elasticsearch-dbapiProvides DBAPI (PEP-249) and SQLAlchemy dialect…
permissive · top 5,000 on PyPI