finds.dev← search

// the find

elastic/elasticsearch-dsl-py

★ 3,870 · Python · Apache-2.0 · updated Apr 2025

High level Python client for Elasticsearch

A Python DSL that wraps the Elasticsearch query API with chainable Python objects instead of raw dict nesting. As of 8.18.0, the package has been absorbed into the official elasticsearch-py client — this repo is now effectively deprecated. Relevant mainly to anyone on ES 7.x or maintaining legacy code that still imports from elasticsearch_dsl.

The chainable Search API genuinely improves on raw dict construction — adding filters, aggregations, and exclusions without re-structuring the whole dict is a real ergonomic win. The Document ORM layer is usable for simple indexing workflows without much boilerplate. Search.from_dict() / to_dict() round-tripping is a smart migration path that lets you adopt incrementally. Both sync and async variants are first-class, with mirrored test coverage.

The repo is deprecated — its future is as a namespace redirect stub inside elasticsearch-py, not a standalone library. If you're starting fresh on ES 8.x, you should just install elasticsearch>=8.18.0 and use elasticsearch.dsl instead of this. The Document ORM never matched Django ORM's depth — no queryset lazy evaluation, no relation handling, validation is thin. Faceted search abstraction is handy until you hit anything non-trivial, at which point you're back to raw DSL anyway.

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 →