{"id":13368181,"url":"https://github.com/supabase/postgrest-py","last_synced_at":"2025-05-14T14:08:39.781Z","repository":{"id":38342817,"uuid":"263793262","full_name":"supabase/postgrest-py","owner":"supabase","description":"PostgREST client for Python. This library provides an ORM interface to PostgREST","archived":false,"fork":false,"pushed_at":"2025-05-10T09:10:21.000Z","size":1193,"stargazers_count":281,"open_issues_count":6,"forks_count":57,"subscribers_count":15,"default_branch":"main","last_synced_at":"2025-05-10T09:30:22.978Z","etag":null,"topics":["community","postgrest","python","supabase"],"latest_commit_sha":null,"homepage":"https://postgrest-py.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/supabase.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["supabase"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-05-14T02:18:24.000Z","updated_at":"2025-05-10T02:19:50.000Z","dependencies_parsed_at":"2022-07-18T03:30:40.543Z","dependency_job_id":"c67415ca-ee46-4300-a212-7faa49e7cc41","html_url":"https://github.com/supabase/postgrest-py","commit_stats":{"total_commits":351,"total_committers":29,"mean_commits":12.10344827586207,"dds":0.5754985754985755,"last_synced_commit":"a8aee9a7f5a708eb5f6622a3388ebbf302d530b5"},"previous_names":["supabase/postgrest-py","supabase-community/postgrest-py"],"tags_count":56,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fpostgrest-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fpostgrest-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fpostgrest-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/supabase%2Fpostgrest-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/supabase","download_url":"https://codeload.github.com/supabase/postgrest-py/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253434483,"owners_count":21907918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["community","postgrest","python","supabase"],"created_at":"2024-07-30T01:00:53.378Z","updated_at":"2025-05-14T14:08:39.761Z","avatar_url":"https://github.com/supabase.png","language":"Python","funding_links":["https://github.com/sponsors/supabase"],"categories":["Python","Postgrest"],"sub_categories":[],"readme":"# postgrest-py\n\n[PostgREST](https://postgrest.org) client for Python. This library provides an \"ORM-like\" interface to PostgREST.\n\n## INSTALLATION\n\n### Requirements\n\n- Python \u003e= 3.9\n- PostgreSQL \u003e= 13\n- PostgREST \u003e= 11\n\n### Local PostgREST server\n\nIf you want to use a local PostgREST server for development, you can use our preconfigured instance via Docker Compose.\n\n```sh\ndocker-compose up\n```\n\nOnce Docker Compose started, PostgREST is accessible at \u003chttp://localhost:3000\u003e.\n\n### Instructions\n\n#### With Poetry (recommended)\n\n```sh\npoetry add postgrest\n```\n\n#### With Pip\n\n```sh\npip install postgrest\n```\n\n## USAGE\n\n### Getting started\n\n```py\nimport asyncio\nfrom postgrest import AsyncPostgrestClient\n\nasync def main():\n    async with AsyncPostgrestClient(\"http://localhost:3000\") as client:\n        r = await client.from_(\"countries\").select(\"*\").execute()\n        countries = r.data\n\nasyncio.run(main())\n```\n\n### Create\n\n```py\nawait client.from_(\"countries\").insert({ \"name\": \"Việt Nam\", \"capital\": \"Hà Nội\" }).execute()\n```\n\n### Read\n\n```py\nr = await client.from_(\"countries\").select(\"id\", \"name\").execute()\ncountries = r.data\n```\n\n### Update\n\n```py\nawait client.from_(\"countries\").update({\"capital\": \"Hà Nội\"}).eq(\"name\", \"Việt Nam\").execute()\n```\n\n### Delete\n\n```py\nawait client.from_(\"countries\").delete().eq(\"name\", \"Việt Nam\").execute()\n```\n\n### General filters\n\n### Stored procedures (RPC)\n```py\nawait client.rpc(\"foobar\", {\"arg1\": \"value1\", \"arg2\": \"value2\"}).execute()\n```\n\n## DEVELOPMENT\n\n```sh\ngit clone https://github.com/supabase/postgrest-py.git\ncd postgrest-py\npoetry install\npoetry run pre-commit install\n```\n\n### Testing\n\n```sh\npoetry run pytest\n```\n\n## CHANGELOG\n\nRead more [here](https://github.com/supabase/postgrest-py/blob/main/CHANGELOG.md).\n\n## SPONSORS\n\nWe are building the features of Firebase using enterprise-grade, open source products. We support existing communities wherever possible, and if the products don’t exist we build them and open source them ourselves. Thanks to these sponsors who are making the OSS ecosystem better for everyone.\n\n[![Worklife VC](https://user-images.githubusercontent.com/10214025/90451355-34d71200-e11e-11ea-81f9-1592fd1e9146.png)](https://www.worklife.vc)\n[![New Sponsor](https://user-images.githubusercontent.com/10214025/90518111-e74bbb00-e198-11ea-8f88-c9e3c1aa4b5b.png)](https://github.com/sponsors/supabase)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase%2Fpostgrest-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsupabase%2Fpostgrest-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsupabase%2Fpostgrest-py/lists"}