1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, pythonOlder
5, strenum
6, token-bucket
7}:
8
9buildPythonPackage rec {
10 pname = "limiter";
11 version = "0.3.1";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.10";
15
16 src = fetchFromGitHub {
17 owner = "alexdelorenzo";
18 repo = pname;
19 rev = "v${version}";
20 hash = "sha256-2Et4ozVf9t+tp2XtLbDk/LgLIU+jQAEAlU8hA5lpxdk=";
21 };
22
23 propagatedBuildInputs = [
24 strenum
25 token-bucket
26 ];
27
28 # Module has no tests
29 doCheck = false;
30
31 pythonImportsCheck = [
32 "limiter"
33 ];
34
35 meta = with lib; {
36 description = "Python rate-limiting, thread-safe and asynchronous decorators and context managers";
37 homepage = "https://github.com/alexdelorenzo/limiter";
38 license = with licenses; [ agpl3Only ];
39 maintainers = with maintainers; [ fab ];
40 };
41}