1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 dateparser,
7 httmock,
8 matplotlib,
9 numpy,
10 pandas,
11 setuptools,
12 requests,
13}:
14
15buildPythonPackage rec {
16 pname = "prometheus-api-client";
17 version = "0.6.0";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "4n4nd";
22 repo = "prometheus-api-client-python";
23 tag = "v${version}";
24 hash = "sha256-Xi3n1Ha6bpfp4KfCh/Zky7bBrXOojuR6BVzPNQ3a18Y=";
25 };
26
27 build-system = [ setuptools ];
28
29 dependencies = [
30 dateparser
31 matplotlib
32 numpy
33 pandas
34 requests
35 ];
36
37 nativeCheckInputs = [ pytestCheckHook ];
38
39 checkInputs = [ httmock ];
40
41 disabledTestPaths = [ "tests/test_prometheus_connect.py" ];
42
43 pythonImportsCheck = [ "prometheus_api_client" ];
44
45 meta = with lib; {
46 description = "Python wrapper for the Prometheus HTTP API";
47 longDescription = ''
48 The prometheus-api-client library consists of multiple modules which
49 assist in connecting to a Prometheus host, fetching the required metrics
50 and performing various aggregation operations on the time series data.
51 '';
52 homepage = "https://github.com/4n4nd/prometheus-api-client-python";
53 changelog = "https://github.com/4n4nd/prometheus-api-client-python/blob/${src.tag}/CHANGELOG.md";
54 license = licenses.mit;
55 maintainers = [ ];
56 };
57}