summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/starsessions/default.nix
blob: 9fbd1de356743e1e13343fce48eb585f3bf2b004 (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
54
55
56
57
58
59
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  poetry-core,
  itsdangerous,
  redis,
  starlette,
  pytestCheckHook,
  pytest-asyncio,
  pytest-cov-stub,
  httpx,
}:

buildPythonPackage rec {
  pname = "starsessions";
  version = "2.2.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "alex-oleshkevich";
    repo = "starsessions";
    tag = "v${version}";
    hash = "sha256-JI044sn6LQI37PvSLdz2dooa3v5qdHmp6DZD0p7VzJU=";
  };

  build-system = [ poetry-core ];

  dependencies = [
    itsdangerous
    starlette
  ];

  pythonImportsCheck = [ "starsessions" ];

  optional-dependencies = {
    redis = [
      redis
    ];
  };

  nativeCheckInputs = [
    httpx
    pytestCheckHook
    pytest-asyncio
    pytest-cov-stub
  ];

  disabledTestPaths = [
    "tests/backends/test_redis.py" # requires a running redis instance
  ];

  meta = {
    description = "Advanced sessions for Starlette and FastAPI frameworks";
    homepage = "https://github.com/alex-oleshkevich/starsessions";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ drupol ];
  };
}