1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 deprecation,
6 h2,
7 httpx,
8 poetry-core,
9 pydantic,
10 pytestCheckHook,
11 pythonPackages,
12}:
13
14buildPythonPackage rec {
15 pname = "postgrest";
16 version = "1.1.1";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "supabase";
21 repo = "postgrest-py";
22 tag = "v${version}";
23 hash = "sha256-WTS8J8XhHPSe6N1reY3j2QYHaRY1goiVoqQCUKSgbVY=";
24 };
25
26 build-system = [ poetry-core ];
27
28 dependencies = [
29 deprecation
30 httpx
31 pydantic
32 ];
33
34 nativeCheckInputs = [
35 pytestCheckHook
36 h2
37 ];
38
39 # Lots of tests fail without network access
40 disabledTestPaths = [
41 "tests/_async/test_client.py"
42 "tests/_async/test_filter_request_builder.py"
43 "tests/_async/test_filter_request_builder_integration.py"
44 "tests/_async/test_query_request_builder.py"
45 "tests/_async/test_request_builder.py"
46 "tests/_sync/test_filter_request_builder_integration.py"
47 ];
48 disabledTests = [
49 "test_params_purged_after_execute"
50 ];
51
52 pythonImportsCheck = [ "postgrest" ];
53
54 meta = {
55 description = "PostgREST client for Python, provides an ORM interface to PostgREST";
56 homepage = "https://github.com/supabase/postgrest-py";
57 changelog = "https://github.com/supabase/postgrest-py/releases/tag/v${version}";
58 license = lib.licenses.mit;
59 maintainers = with lib.maintainers; [ jherland ];
60 };
61}