PostgREST client for Python. This library provides an ORM interface to PostgREST.
Project Links
Meta
Author: Lương Quang Mạnh, Joel Lee, Anand, Oliver Rice, Andrew Smith
Maintainer: Leonardo Santiago
Requires Python: >=3.9
Classifiers
Programming Language
- Python :: 3
License
- OSI Approved :: MIT License
Operating System
- OS Independent
postgrest-py
PostgREST client for Python. This library provides an "ORM-like" interface to PostgREST.
INSTALLATION
Requirements
- Python >= 3.9
- PostgreSQL >= 13
- PostgREST >= 11
Local PostgREST server
If you want to use a local PostgREST server for development, you can use our preconfigured instance via Docker Compose.
docker-compose up
Once Docker Compose started, PostgREST is accessible at http://localhost:3000.
Instructions
With uv (recommended)
uv add postgrest
With Pip
pip install postgrest
USAGE
Getting started
import asyncio
from postgrest import AsyncPostgrestClient
async def main():
async with AsyncPostgrestClient("http://localhost:3000") as client:
r = await client.from_("countries").select("*").execute()
countries = r.data
asyncio.run(main())
Create
await client.from_("countries").insert({ "name": "Việt Nam", "capital": "Hà Nội" }).execute()
Read
r = await client.from_("countries").select("id", "name").execute()
countries = r.data
Update
await client.from_("countries").update({"capital": "Hà Nội"}).eq("name", "Việt Nam").execute()
Delete
await client.from_("countries").delete().eq("name", "Việt Nam").execute()
General filters
Stored procedures (RPC)
await client.rpc("foobar", {"arg1": "value1", "arg2": "value2"}).execute()
CHANGELOG
Read more here.
SPONSORS
We 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.
2.28.3
Mar 20, 2026
2.28.2
Mar 13, 2026
2.28.1
Mar 13, 2026
2.28.0
Feb 10, 2026
2.27.3
Feb 03, 2026
2.27.2
Jan 14, 2026
2.27.1
Jan 06, 2026
2.27.0
Dec 16, 2025
2.26.0
Dec 15, 2025
2.25.1
Dec 10, 2025
2.25.0
Dec 03, 2025
2.24.0
Nov 07, 2025
2.23.3
Nov 06, 2025
2.23.2
Nov 03, 2025
2.23.1
Nov 03, 2025
2.23.0
Oct 31, 2025
2.22.4
Oct 30, 2025
2.22.3
Oct 28, 2025
2.22.2
Oct 24, 2025
2.22.1
Oct 21, 2025
2.22.0
Oct 08, 2025
2.21.1
Oct 03, 2025
2.21.0
Oct 03, 2025
2.20.0
Sep 22, 2025
2.19.0
Sep 17, 2025
1.1.1
Jun 23, 2025
1.1.0
Jun 19, 2025
1.0.2
May 21, 2025
1.0.1
Mar 25, 2025
1.0.0
Mar 11, 2025
0.19.3
Jan 24, 2025
0.19.1
Dec 30, 2024
0.19.0
Nov 22, 2024
0.18.0
Oct 31, 2024
0.17.2
Oct 18, 2024
0.17.1
Oct 03, 2024
0.17.0
Sep 28, 2024
0.16.11
Aug 22, 2024
0.16.10
Aug 14, 2024
0.16.9
Jul 16, 2024
0.16.8
Jun 04, 2024
0.16.7
Jun 01, 2024
0.16.6
Jun 01, 2024
0.16.5
Jun 01, 2024
0.16.4
Apr 29, 2024
0.16.3
Apr 13, 2024
0.16.2
Mar 23, 2024
0.16.1
Feb 29, 2024
0.16.0
Feb 27, 2024
0.15.1
Feb 27, 2024
0.15.0
Jan 15, 2024
0.14.0
Jan 15, 2024
0.13.2
Jan 11, 2024
0.13.1
Jan 04, 2024
0.13.0
Oct 22, 2023
0.12.1
Oct 17, 2023
0.12.0
Oct 06, 2023
0.11.0
Sep 28, 2023
0.10.8
Aug 04, 2023
0.10.7
Aug 04, 2023
0.10.6
Feb 26, 2023
0.10.5
Feb 19, 2023
0.10.4
Jan 26, 2023
0.10.3
Jan 23, 2023
0.0.1
Jun 05, 2019
Wheel compatibility matrix
Files in release
Extras:
None
Dependencies:
httpx[http2]
(<0.29,>=0.26)
deprecation
(>=2.1.0)
pydantic
(<3.0,>=1.9)
strenum
(>=0.4.9)
yarl
(>=1.20.1)

