diff --git a/pkgs/development/python-modules/twitchapi/default.nix b/pkgs/development/python-modules/twitchapi/default.nix new file mode 100644 index 000000000000..c6d5fbffc500 --- /dev/null +++ b/pkgs/development/python-modules/twitchapi/default.nix @@ -0,0 +1,48 @@ +{ lib +, buildPythonPackage +, fetchPypi +, aiohttp +, python-dateutil +, requests +, typing-extensions +, websockets +}: + +buildPythonPackage rec { + pname = "twitchapi"; + version = "2.5.2"; + + format = "setuptools"; + + src = fetchPypi { + pname = "twitchAPI"; + inherit version; + sha256 = "f0ee5388911154375170a83df9a18e8a698fe382cea5d94a3e33ad27a7ce9133"; + }; + + propagatedBuildInputs = [ + aiohttp + python-dateutil + requests + typing-extensions + websockets + ]; + + # upstream has no tests + doCheck = false; + + pythonImportsCheck = [ + "twitchAPI.eventsub" + "twitchAPI.oauth" + "twitchAPI.pubsub" + "twitchAPI.twitch" + "twitchAPI.types" + ]; + + meta = with lib; { + description = "Python implementation of the Twitch Helix API, its Webhook, PubSub and EventSub"; + homepage = "https://github.com/Teekeks/pyTwitchAPI"; + license = licenses.mit; + maintainers = with maintainers; [ dotlambda ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index be2c9c59ded6..3a9c01a08fd9 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10137,6 +10137,8 @@ in { twitch-python = callPackage ../development/python-modules/twitch-python { }; + twitchapi = callPackage ../development/python-modules/twitchapi { }; + twitter = callPackage ../development/python-modules/twitter { }; twitter-common-collections = callPackage ../development/python-modules/twitter-common-collections { };