skillfed

elasticsearch7

Python client for Elasticsearch

elasticsearch7 v7.17.13 211.8K downloads/30d#9,475 on PyPI4,385
Permissive license Apache-2.0 Active released

What it is and what it does

elasticsearch7 is the official Python client library for communicating with Elasticsearch clusters. It abstracts away the HTTP protocol layer, providing a Python API for cluster discovery, node selection, connection pooling, and authentication. The package handles automatic serialization of Python data types to JSON, manages persistent connections with load balancing across available nodes, and includes retry logic with connection penalization.

Developers use it to query, index, and manage documents in Elasticsearch from Python applications. The client supports both synchronous and asynchronous patterns (via optional extras), thread-safe concurrent requests, and pluggable components for customizing connection strategies and authentication. It's designed to work with Elasticsearch versions greater than or equal to the server's minor version.

Use it for:

  • Building search functionality into web applications that index and query documents stored in Elasticsearch.
  • Automating bulk indexing of data into Elasticsearch from Python ETL pipelines or data processing workflows.
  • Monitoring and managing Elasticsearch cluster health and node status from Python applications.
  • Integrating full-text search capabilities into Python backends without writing raw HTTP requests.
  • Implementing real-time analytics dashboards that query Elasticsearch data through Python services.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Official Python client for Elasticsearch that handles connection management, load balancing, and API communication with Elasticsearch clusters.

Yes. This is the official, actively maintained client with low install friction, permissive licensing, no known vulnerabilities, and broad Python version support. It is the standard choice for any Python application that needs to communicate with Elasticsearch. Install it unless you have a specific reason to use an alternative client or are not using Elasticsearch.

Install

elasticsearch7 on PyPI

pip

pip install elasticsearch7

uv

uv add elasticsearch7

poetry

poetry add elasticsearch7

Installing elasticsearch7

Before you install

Low install friction with only two lightweight runtime dependencies (urllib3, certifi). Actively maintained with recent commits and a large repository presence (4385 stars), indicating stable ongoing support.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions; attribution and license inclusion required in distributions.

Quickstart

pip install elasticsearch7

from elasticsearch import Elasticsearch
client = Elasticsearch("http://localhost:9200")
resp = client.info()

Requires a running Elasticsearch server accessible at the specified host and port.

Verify before relying

  • Whether async/await support is available via the [async] extra and what additional dependencies that requires.
  • Specific version compatibility guarantees between this client and Elasticsearch server versions beyond 'forward compatible'.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,<4,>=2.7)
Install friction low — pure-Python wheel
Runtime dependencies 2 — urllib3, certifi
Maintenance actively maintained — 214 days since the last release
Last repo commit
First released
Downloads 211,769/month — #9,475 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: elasticsearch7-7.17.13-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.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming 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

elasticsearch python clientelasticsearch api wrapperelasticsearch connection managementsearch engine python libraryelasticsearch cluster clientelasticsearch http clientelasticsearch query library
search-engineelasticsearchdatabase-client

More Database packages