2021-10-11 16:52:03 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pythonOlder
|
2022-02-20 05:27:41 +00:00
|
|
|
, strenum
|
2021-10-11 16:52:03 +00:00
|
|
|
, token-bucket
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "limiter";
|
2022-02-20 05:27:41 +00:00
|
|
|
version = "0.3.1";
|
2022-01-13 20:06:32 +00:00
|
|
|
format = "setuptools";
|
2021-10-11 16:52:03 +00:00
|
|
|
|
2022-01-13 20:06:32 +00:00
|
|
|
disabled = pythonOlder "3.10";
|
2021-10-11 16:52:03 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "alexdelorenzo";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2022-02-20 05:27:41 +00:00
|
|
|
hash = "sha256-2Et4ozVf9t+tp2XtLbDk/LgLIU+jQAEAlU8hA5lpxdk=";
|
2021-10-11 16:52:03 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
2022-02-20 05:27:41 +00:00
|
|
|
strenum
|
2021-10-11 16:52:03 +00:00
|
|
|
token-bucket
|
|
|
|
];
|
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
# Module has no tests
|
2021-10-11 16:52:03 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"limiter"
|
|
|
|
];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python rate-limiting, thread-safe and asynchronous decorators and context managers";
|
|
|
|
homepage = "https://github.com/alexdelorenzo/limiter";
|
|
|
|
license = with licenses; [ agpl3Only ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|