diff --git a/pkgs/development/python-modules/asyncio-throttle/default.nix b/pkgs/development/python-modules/asyncio-throttle/default.nix new file mode 100644 index 00000000000..bf08aec41a5 --- /dev/null +++ b/pkgs/development/python-modules/asyncio-throttle/default.nix @@ -0,0 +1,34 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, pytestCheckHook +, pytest-asyncio +}: + +buildPythonPackage rec { + pname = "asyncio-throttle"; + version = "1.0.1"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "hallazzang"; + repo = pname; + rev = "v${version}"; + sha256 = "0raqnrnp42cn1c7whbm7ajbgaczx33k6hbxsj30nh998pqxhh4sj"; + }; + + checkInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ "asyncio_throttle" ]; + + meta = with lib; { + description = "Simple, easy-to-use throttler for asyncio"; + homepage = "https://github.com/hallazzang/asyncio-throttle"; + license = licenses.mit; + maintainers = with maintainers; [ hexa ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3f7524840f8..86da8934719 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -426,6 +426,8 @@ in { async_generator = callPackage ../development/python-modules/async_generator { }; + asyncio-throttle = callPackage ../development/python-modules/asyncio-throttle { }; + asyncpg = callPackage ../development/python-modules/asyncpg { }; asyncssh = callPackage ../development/python-modules/asyncssh { };