From e292274232baffb7e81bcf84407c8b97fa5b6f38 Mon Sep 17 00:00:00 2001 From: Johan Herland Date: Wed, 25 Jun 2025 13:55:24 +0000 Subject: [PATCH] python3Packages.postgrest-py: init at 1.1.1 --- .../python-modules/postgrest-py/default.nix | 61 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 63 insertions(+) create mode 100644 pkgs/development/python-modules/postgrest-py/default.nix diff --git a/pkgs/development/python-modules/postgrest-py/default.nix b/pkgs/development/python-modules/postgrest-py/default.nix new file mode 100644 index 000000000000..8e3b02bdd457 --- /dev/null +++ b/pkgs/development/python-modules/postgrest-py/default.nix @@ -0,0 +1,61 @@ +{ + lib, + buildPythonPackage, + fetchFromGitHub, + deprecation, + h2, + httpx, + poetry-core, + pydantic, + pytestCheckHook, + pythonPackages, +}: + +buildPythonPackage rec { + pname = "postgrest-py"; + version = "1.1.1"; + pyproject = true; + + src = fetchFromGitHub { + owner = "supabase"; + repo = "postgrest-py"; + tag = "v${version}"; + hash = "sha256-WTS8J8XhHPSe6N1reY3j2QYHaRY1goiVoqQCUKSgbVY="; + }; + + build-system = [ poetry-core ]; + + dependencies = [ + deprecation + httpx + pydantic + ]; + + nativeCheckInputs = [ + pytestCheckHook + h2 + ]; + + # Lots of tests fail without network access + disabledTestPaths = [ + "tests/_async/test_client.py" + "tests/_async/test_filter_request_builder.py" + "tests/_async/test_filter_request_builder_integration.py" + "tests/_async/test_query_request_builder.py" + "tests/_async/test_request_builder.py" + "tests/_sync/test_filter_request_builder_integration.py" + ]; + disabledTests = [ + "test_params_purged_after_execute" + ]; + + pythonImportsCheck = [ "postgrest" ]; + + meta = { + description = "PostgREST client for Python, provides an ORM interface to PostgREST"; + homepage = "https://github.com/supabase/postgrest-py"; + changelog = "https://github.com/supabase/postgrest-py/releases/tag/v${version}"; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ jherland ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index a17766a683ad..dbe0cd64c8b7 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -11683,6 +11683,8 @@ self: super: with self; { posix-ipc = callPackage ../development/python-modules/posix-ipc { }; + postgrest-py = callPackage ../development/python-modules/postgrest-py { }; + posthog = callPackage ../development/python-modules/posthog { }; pot = callPackage ../development/python-modules/pot { };