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