b5f92a349c
GitOrigin-RevId: 7c9cc5a6e5d38010801741ac830a3f8fd667a7a0
46 lines
963 B
Nix
46 lines
963 B
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, poetry-core
|
|
, pyrate-limiter
|
|
, requests
|
|
, pytestCheckHook
|
|
, requests-mock
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "requests-ratelimiter";
|
|
version = "0.4.2";
|
|
pyproject = true;
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "JWCook";
|
|
repo = "requests-ratelimiter";
|
|
rev = "v${version}";
|
|
hash = "sha256-w4cBQRpk9UTuGA0lPDsqpQ3UEIQdYe38NYXz+V4+Lvc=";
|
|
};
|
|
|
|
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 ];
|
|
};
|
|
}
|