From 0d960fa17a4c057f8099412ee1bf3f8207cbfa95 Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Sat, 4 Apr 2026 17:15:05 -0700 Subject: [PATCH] python3Packages.chess-com-api: init at 1.1.0 --- .../python-modules/chess-com-api/default.nix | 51 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 53 insertions(+) create mode 100644 pkgs/development/python-modules/chess-com-api/default.nix diff --git a/pkgs/development/python-modules/chess-com-api/default.nix b/pkgs/development/python-modules/chess-com-api/default.nix new file mode 100644 index 000000000000..94be25991aaf --- /dev/null +++ b/pkgs/development/python-modules/chess-com-api/default.nix @@ -0,0 +1,51 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + hatchling, + aiohttp, + pytestCheckHook, + pytest-asyncio, + pytest-cov-stub, + pytest-mock, +}: + +buildPythonPackage (finalAttrs: { + pname = "chess-com-api"; + version = "1.1.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "Stupidoodle"; + repo = "chess-com-api"; + tag = "v${finalAttrs.version}"; + hash = "sha256-/84rDQwD1Qxl1x7AOF6KFTYqYOdqQyzuhgiz5gArMmo="; + }; + + build-system = [ hatchling ]; + + dependencies = [ aiohttp ]; + + nativeCheckInputs = [ + pytestCheckHook + pytest-asyncio + pytest-cov-stub + pytest-mock + ]; + + disabledTestPaths = [ + # require network access + "tests/test_client.py" + "tests/test_integration.py" + ]; + + pythonImportsCheck = [ "chess_com_api" ]; + + meta = { + description = "An async Python wrapper for the Chess.com API"; + homepage = "https://github.com/Stupidoodle/chess-com-api"; + changelog = "https://github.com/Stupidoodle/chess-com-api/releases/tag/${finalAttrs.src.tag}"; + license = lib.licenses.mit; + maintainers = [ lib.maintainers.jamiemagee ]; + }; +}) diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d08f34e023de..1a5131369101 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2689,6 +2689,8 @@ self: super: with self; { chess = callPackage ../development/python-modules/chess { }; + chess-com-api = callPackage ../development/python-modules/chess-com-api { }; + chevron = callPackage ../development/python-modules/chevron { }; chex = callPackage ../development/python-modules/chex { };