2023-10-19 13:55:26 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, poetry-core
|
|
|
|
, pyrate-limiter
|
|
|
|
, requests
|
|
|
|
, pytestCheckHook
|
|
|
|
, requests-mock
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "requests-ratelimiter";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.6.0";
|
2023-10-19 13:55:26 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "JWCook";
|
|
|
|
repo = "requests-ratelimiter";
|
2024-02-29 20:09:43 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-ctCD+vlV90KCO7DdPUZJipBC/lz6NXx0gYuHHrs22IY=";
|
2023-10-19 13:55:26 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
pyrate-limiter
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
requests-mock
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "requests_ratelimiter" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Easy rate-limiting for python requests";
|
|
|
|
homepage = "https://github.com/JWCook/requests-ratelimiter";
|
|
|
|
changelog = "https://github.com/JWCook/requests-ratelimiter/blob/${src.rev}/HISTORY.md";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ mbalatsko ];
|
|
|
|
};
|
|
|
|
}
|