1{
2 lib,
3 aiohttp,
4 buildPythonPackage,
5 certifi,
6 elastic-transport,
7 fetchPypi,
8 pythonOlder,
9 requests,
10 urllib3,
11}:
12
13buildPythonPackage rec {
14 pname = "elasticsearch";
15 version = "8.13.0";
16 format = "setuptools";
17
18 disabled = pythonOlder "3.7";
19
20 src = fetchPypi {
21 inherit pname version;
22 sha256 = "sha256-5Ovrsi0J8O+DnCa2qpjhnM1ja8t38IwStWKwLKzV50Q=";
23 };
24
25 nativeBuildInputs = [ elastic-transport ];
26
27 propagatedBuildInputs = [
28 urllib3
29 certifi
30 ];
31
32 passthru.optional-dependencies = {
33 requests = [ requests ];
34 async = [ aiohttp ];
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}