1{
2 lib,
3 buildPythonPackage,
4 certifi,
5 click,
6 ecs-logging,
7 elastic-transport,
8 elasticsearch8,
9 fetchFromGitHub,
10 hatchling,
11 mock,
12 pytest-asyncio,
13 pytestCheckHook,
14 pythonOlder,
15 pythonRelaxDepsHook,
16 pyyaml,
17 requests,
18 six,
19 voluptuous,
20}:
21
22buildPythonPackage rec {
23 pname = "es-client";
24 version = "8.13.1";
25 pyproject = true;
26
27 disabled = pythonOlder "3.8";
28
29 src = fetchFromGitHub {
30 owner = "untergeek";
31 repo = "es_client";
32 rev = "refs/tags/v${version}";
33 hash = "sha256-4v9SRWVG9p4kCob4C3by2JxNqX6L3yMHpbnMYEAM7A0=";
34 };
35
36 pythonRelaxDeps = true;
37
38 build-system = [ hatchling ];
39
40 nativeBuildInputs = [ pythonRelaxDepsHook ];
41
42 dependencies = [
43 certifi
44 click
45 ecs-logging
46 elastic-transport
47 elasticsearch8
48 pyyaml
49 six
50 voluptuous
51 ];
52
53 nativeCheckInputs = [
54 mock
55 pytest-asyncio
56 pytestCheckHook
57 requests
58 ];
59
60 pythonImportsCheck = [ "es_client" ];
61
62 disabledTests = [
63 # Tests require network access
64 "test_bad_version_raises"
65 "test_basic_operation"
66 "test_basic_operation"
67 "test_client_info"
68 "test_logging_options_ecs"
69 "test_logging_options_json"
70 "test_multiple_hosts_raises"
71 "test_non_dict_passed"
72 "test_skip_version_check"
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/v${version}";
79 license = licenses.asl20;
80 maintainers = with maintainers; [ fab ];
81 };
82}