1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, poetry-core
5, pyrate-limiter
6, requests
7, pytestCheckHook
8, requests-mock
9}:
10
11buildPythonPackage rec {
12 pname = "requests-ratelimiter";
13 version = "0.4.2";
14 pyproject = true;
15
16 src = fetchFromGitHub {
17 owner = "JWCook";
18 repo = "requests-ratelimiter";
19 rev = "v${version}";
20 hash = "sha256-w4cBQRpk9UTuGA0lPDsqpQ3UEIQdYe38NYXz+V4+Lvc=";
21 };
22
23 nativeBuildInputs = [
24 poetry-core
25 ];
26
27 propagatedBuildInputs = [
28 pyrate-limiter
29 requests
30 ];
31
32 nativeCheckInputs = [
33 pytestCheckHook
34 requests-mock
35 ];
36
37 pythonImportsCheck = [ "requests_ratelimiter" ];
38
39 meta = with lib; {
40 description = "Easy rate-limiting for python requests";
41 homepage = "https://github.com/JWCook/requests-ratelimiter";
42 changelog = "https://github.com/JWCook/requests-ratelimiter/blob/${src.rev}/HISTORY.md";
43 license = licenses.mit;
44 maintainers = with maintainers; [ mbalatsko ];
45 };
46}