summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/fitbit-web-api/default.nix
blob: 7bfb4f5e87492ddda2d095ea84dfe25105784e3c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  hatchling,
  aiohttp,
  aiohttp-retry,
  pydantic,
  pytest-aiohttp,
  pytestCheckHook,
  python-dateutil,
  typing-extensions,
  urllib3,
}:

buildPythonPackage rec {
  pname = "fitbit-web-api";
  version = "2.13.5";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "allenporter";
    repo = "fitbit-web-api";
    tag = "v${version}";
    hash = "sha256-HqlySvC6EGnetrh0t8shapS/ggSRVoI8xPXta2eBqlk=";
  };

  build-system = [ hatchling ];

  dependencies = [
    aiohttp
    aiohttp-retry
    pydantic
    python-dateutil
    typing-extensions
    urllib3
  ];

  pythonImportsCheck = [ "fitbit_web_api" ];

  nativeCheckInputs = [
    pytest-aiohttp
    pytestCheckHook
  ];

  meta = {
    changelog = "https://github.com/allenporter/fitbit-web-api/blob/${src.tag}/CHANGELOG.md";
    description = "Access data from Fitbit activity trackers, Aria scale, and manually entered logs";
    homepage = "https://github.com/allenporter/fitbit-web-api";
    license = lib.licenses.asl20;
    maintainers = [ lib.maintainers.dotlambda ];
  };
}