1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 elastic-transport,
6 fetchPypi,
7 hatchling,
8 orjson,
9 pyarrow,
10 pythonOlder,
11 requests,
12}:
13
14buildPythonPackage rec {
15 pname = "elasticsearch";
16 version = "8.17.2";
17 pyproject = true;
18
19 disabled = pythonOlder "3.8";
20
21 src = fetchPypi {
22 inherit pname version;
23 hash = "sha256-/38duK7v2HzrpO3OOqQHCZRYLmzwKdLme3TmbWNFCds=";
24 };
25
26 build-system = [ hatchling ];
27
28 dependencies = [ elastic-transport ];
29
30 optional-dependencies = {
31 requests = [ requests ];
32 async = [ aiohttp ];
33 orjson = [ orjson ];
34 pyarrow = [ pyarrow ];
35 };
36
37 pythonImportsCheck = [ "elasticsearch" ];
38
39 # Check is disabled because running them destroy the content of the local cluster!
40 # https://github.com/elasticsearch/elasticsearch-py/tree/master/test_elasticsearch
41 doCheck = false;
42
43 meta = with lib; {
44 description = "Official low-level client for Elasticsearch";
45 homepage = "https://github.com/elasticsearch/elasticsearch-py";
46 changelog = "https://github.com/elastic/elasticsearch-py/releases/tag/v${version}";
47 license = licenses.asl20;
48 maintainers = with maintainers; [ desiderius ];
49 };
50}