Elasticsearch Python Client

The official Python client for querying, indexing, and managing an Elasticsearch cluster

SDK
PyPI
v9.5.0
4,385stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
94/100Excellent
Development Activity92
Maintenance88
Community96
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
81/100Excellent
Architecture87
Code Quality90
Innovation75
Learning Curve72

The Elasticsearch Python client is Elastic’s official SDK for talking to an Elasticsearch cluster from Python. It wraps the full REST API surface in both synchronous and asyncio-based clients, adds connection pooling, retries, and sniffing, and layers a Django-ORM-like query DSL and an ES|QL helper on top of the raw request/response API so teams can index documents, run searches, and manage cluster state without hand-building HTTP calls.

What You Get

  • Full REST API coverage generated from Elasticsearch’s API specification, kept in lockstep with server versions
  • Both synchronous (Elasticsearch) and asyncio-based (AsyncElasticsearch) client classes
  • A Django-style query DSL module (elasticsearch.dsl) for building complex queries and mappings as Python objects
  • Built-in connection pooling, retry logic, node sniffing, and OpenTelemetry instrumentation
  • Bulk and streaming helpers for high-throughput indexing and scrolling through large result sets

Common Use Cases

  • Building full-text search features backed by an Elasticsearch cluster in a Python web application
  • Bulk-indexing large document sets with the client’s streaming bulk helpers
  • Running aggregations and analytics queries via the query DSL instead of raw JSON query bodies
  • Integrating async Elasticsearch access into asyncio-based services (FastAPI, aiohttp)

Under The Hood

Architecture - The client separates transport concerns (_sync/_async connection and transport modules handling pooling, retries, and node sniffing) from the generated API surface in client.py and the dsl subpackage, which compiles high-level query objects down to the same JSON request bodies the raw client sends, giving both a low-level and ORM-like access pattern against one transport layer. Tech Stack - Pure Python supporting 3.10 through 3.14 plus PyPy, with elastic-transport as its HTTP layer, built with hatchling, and OpenTelemetry hooks (_otel.py) baked in for tracing outgoing requests. Code Quality - test_elasticsearch/ mirrors both sync and async clients with dedicated test suites, CI runs against real Elasticsearch versions via noxfile.py, and the generated API bindings carry consistent type stubs (py.typed) across the whole package. API Design - The client mirrors Elasticsearch’s REST API naming almost one-to-one (e.g. client.search(), client.index()), making it easy to map official Elasticsearch documentation directly onto client calls, while the DSL module trades some of that directness for a more Pythonic, composable query-building experience.

Used by 9 apps in this directory

Python
90%
Apache 2.0

Apache Airflow

Data Engineering

46,530

Define, schedule, and monitor complex data workflows as Python code — with a powerful UI, 80+ provider integrations, and battle-tested scalability across thousands of production deployments.

View details
96
Repo Health
89
Technical
66
Dependency
Built with
Python90%
Updated today
TypeScript
50%
Other

Dify

No Code Platforms · AI Development · Developer Tools

152,883

Visual LLM workflow platform with RAG pipelines, agent capabilities, and model management for building production AI applications.

View details
92
Repo Health
85
Technical
71
Dependency
Built with
TypeScript50%
Python47%
Updated today
Python
63%
Other

Keep

Devops · Automation · Monitoring

12,224

The open-source AIOps and alert management platform that unifies 130+ monitoring tools into a single pane of glass with AI-powered correlation, deduplication, and workflow automation.

View details
91
Repo Health
79
Technical
67
Dependency
Built with
Python63%
TypeScript36%
Updated today
Python
68%
MIT

Langflow

AI Agents · AI Development

153,450

Build, test, and deploy AI agents and RAG workflows visually with native API and MCP server export.

View details
90
Repo Health
85
Technical
66
Dependency
Built with
Python68%
TypeScript22%
Updated today
C++
66%
Other

Memgraph

Databases · AI Development

4,347

High-performance in-memory graph database for AI context and real-time analytics

View details
90
Repo Health
79
Technical
70
Dependency
Built with
C++66%
Python18%
Updated today
Python
37%
Other

Open WebUI

AI Assistants · AI Agents

149,204

The extensible, privacy-first AI platform that runs Ollama, OpenAI, and any LLM backend behind a polished, feature-packed web interface.

View details
91
Repo Health
75
Technical
66
Dependency
Built with
Python37%
Svelte33%
JavaScript22%
Updated today
TypeScript
55%
Other

OpenReplay

Analytics

12,525

Self-hosted session replay and product analytics suite that lets you see exactly what users do on your web app — without sending data to third parties.

View details
91
Repo Health
77
Technical
72
Dependency
Built with
TypeScript55%
Go12%
Python10%
Updated yesterday
Python
69%
Apache 2.0

SurfSense

Search · AI Assistants

15,960

The open-source, unlimited NotebookLM alternative with real-time collaboration, a desktop app, and no vendor lock-in.

View details
88
Repo Health
71
Technical
66
Dependency
Built with
Python69%
TypeScript28%
Updated today
Python
94%
Apache 2.0

SWIRL

Search · Databases · Data Engineering

3,039

Federated AI search and RAG across 100+ enterprise sources—no data extraction, no vector database required.

View details
77
Repo Health
83
Technical
65
Dependency
Built with
Python94%
Updated 2 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search