Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions pkgs/development/python-modules/postgrest-py/default.nix
Original file line number Diff line number Diff line change
@@ -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 ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 { };
Expand Down