depot/third_party/nixpkgs/pkgs/development/python-modules/requests-ratelimiter/default.nix
Default email b5f92a349c Project import generated by Copybara.
GitOrigin-RevId: 7c9cc5a6e5d38010801741ac830a3f8fd667a7a0
2023-10-19 15:55:26 +02:00

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 ];
};
}