1{
2 lib,
3 buildPythonPackage,
4 certifi,
5 click,
6 cryptography,
7 dotmap,
8 ecs-logging,
9 elastic-transport,
10 elasticsearch8,
11 fetchFromGitHub,
12 hatchling,
13 mock,
14 pytest-asyncio,
15 pytestCheckHook,
16 pythonOlder,
17 pyyaml,
18 requests,
19 tiered-debug,
20 voluptuous,
21}:
22
23buildPythonPackage rec {
24 pname = "es-client";
25 version = "8.18.2";
26 pyproject = true;
27
28 disabled = pythonOlder "3.8";
29
30 src = fetchFromGitHub {
31 owner = "untergeek";
32 repo = "es_client";
33 tag = "v${version}";
34 hash = "sha256-siB17xVRS/eeKOsJcWdh4foOHXbeV8wwRclXDHodADM=";
35 };
36
37 pythonRelaxDeps = true;
38
39 build-system = [ hatchling ];
40
41 dependencies = [
42 certifi
43 click
44 cryptography
45 dotmap
46 ecs-logging
47 elastic-transport
48 elasticsearch8
49 pyyaml
50 tiered-debug
51 voluptuous
52 ];
53
54 nativeCheckInputs = [
55 mock
56 pytest-asyncio
57 pytestCheckHook
58 requests
59 ];
60
61 pythonImportsCheck = [ "es_client" ];
62
63 disabledTests = [
64 # Tests require local Elasticsearch instance
65 "test_bad_version_raises"
66 "test_basic_operation"
67 "test_client_info"
68 "test_client_info"
69 "test_exit_if_not_master"
70 "test_multiple_hosts_raises"
71 "test_skip_version_check"
72 "TestCLIExample"
73 ];
74
75 meta = with lib; {
76 description = "Module for building Elasticsearch client objects";
77 homepage = "https://github.com/untergeek/es_client";
78 changelog = "https://github.com/untergeek/es_client/releases/tag/${src.tag}";
79 license = licenses.asl20;
80 maintainers = with maintainers; [ fab ];
81 };
82}