1{
2 lib,
3 buildPythonPackage,
4 certifi,
5 fetchFromGitHub,
6 pyarrow,
7 python-dateutil,
8 pythonOlder,
9 reactivex,
10 setuptools,
11 pandas,
12 polars,
13 urllib3,
14}:
15
16buildPythonPackage rec {
17 pname = "influxdb3-python";
18 version = "0.16.0";
19 pyproject = true;
20
21 disabled = pythonOlder "3.8";
22
23 src = fetchFromGitHub {
24 owner = "InfluxCommunity";
25 repo = "influxdb3-python";
26 tag = "v${version}";
27 hash = "sha256-o4w1+srucPlRq/NqICvdRNxmghxEBoXH05m3m0GQJFM=";
28 };
29
30 postPatch = ''
31 # Upstream falls back to a default version if not in a GitHub Actions
32 substituteInPlace setup.py \
33 --replace-fail "version=get_version()," "version = '${version}',"
34 '';
35
36 build-system = [ setuptools ];
37
38 dependencies = [
39 certifi
40 pyarrow
41 python-dateutil
42 reactivex
43 urllib3
44 ];
45
46 optional-dependencies = {
47 pandas = [ pandas ];
48 polars = [ polars ];
49 dataframe = [
50 pandas
51 polars
52 ];
53 };
54
55 # Missing ORC support
56 # https://github.com/NixOS/nixpkgs/issues/212863
57 # nativeCheckInputs = [
58 # pytestCheckHook
59 # ];
60 #
61 # pythonImportsCheck = [
62 # "influxdb_client_3"
63 # ];
64
65 meta = with lib; {
66 description = "Python module that provides a simple and convenient way to interact with InfluxDB 3.0";
67 homepage = "https://github.com/InfluxCommunity/influxdb3-python";
68 changelog = "https://github.com/InfluxCommunity/influxdb3-python/releases/tag/${src.tag}";
69 license = licenses.asl20;
70 maintainers = with maintainers; [ fab ];
71 };
72}