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