diff --git a/pkgs/development/python-modules/urlscan-python/default.nix b/pkgs/development/python-modules/urlscan-python/default.nix new file mode 100644 index 000000000000..679471a1917c --- /dev/null +++ b/pkgs/development/python-modules/urlscan-python/default.nix @@ -0,0 +1,51 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + hatchling, + httpx, + pytest-freezer, + pytest-httpserver, + pytest-randomly, + pytest-timeout, + pytestCheckHook, + uv-dynamic-versioning, +}: + +buildPythonPackage rec { + pname = "urlscan-python"; + version = "0.0.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "urlscan"; + repo = "urlscan-python"; + tag = "v${version}"; + hash = "sha256-HkovBmmVvUYA5U43w5TUOcwhZAN/0o0BETd1s9R940w="; + }; + + build-system = [ + hatchling + uv-dynamic-versioning + ]; + + dependencies = [ httpx ]; + + nativeCheckInputs = [ + pytest-freezer + pytest-httpserver + pytest-randomly + pytest-timeout + pytestCheckHook + ]; + + pythonImportsCheck = [ "urlscan" ]; + + meta = { + description = "Python API client for urlscan.io"; + homepage = "https://github.com/urlscan/urlscan-python/"; + changelog = "https://github.com/urlscan/urlscan-python/releases/tag/${src.tag}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 29b4d5fff488..295ca6dcf132 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -20061,6 +20061,8 @@ self: super: with self; { urlpy = callPackage ../development/python-modules/urlpy { }; + urlscan-python = callPackage ../development/python-modules/urlscan-python { }; + urwid = callPackage ../development/python-modules/urwid { }; urwid-readline = callPackage ../development/python-modules/urwid-readline { };