finds.dev← search

// the find

elastic/elasticsearch-py

★ 4,378 · Python · Apache-2.0 · updated Jun 2026

Official Python client for Elasticsearch

The official Python client for Elasticsearch, maintained by Elastic. It wraps the Elasticsearch REST API with typed Python methods, handles connection pooling and node sniffing, and ships helper utilities for bulk operations and streaming. If you're running Elasticsearch, this is the client you use — there's no real alternative.

The connection layer is well-engineered: automatic node discovery, failed-connection penalization, and load balancing across nodes are built in rather than bolted on. The versioning policy is explicit and sane — client 8.x works with ES 8.x and forward, versioned packages (`elasticsearch7`, `elasticsearch8`) let you pin if you're stuck on an older cluster. Thread safety is a first-class concern, which matters for any server-side usage. The test infrastructure (Buildkite, integration tests against real ES instances) suggests the CI actually exercises the API rather than just mocking it.

The README is nearly empty — it offloads everything to external docs, which makes getting started harder than it should be for a library this widely used. The `docs/examples/` directory is hundreds of hash-named asciidoc files with no structure, which is machine-generated cruft that's useless to browse. Async support exists but isn't prominently documented; the default client is synchronous and you have to know to look for `AsyncElasticsearch`. The library also pulls in the full Elastic SDK surface regardless of what you actually need — there's no lightweight mode if you just want basic index/search operations without the cluster management overhead.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →