postgrest
PostgREST client for Python. This library provides an ORM interface to PostgREST.
Decision gist · record as of 2026-08-14
Yes. The package is actively maintained, has no known vulnerabilities, installs with low friction, and carries a permissive MIT license. It is well-positioned for projects already using PostgREST or considering it as a database abstraction layer. The async-first design fits modern Python web frameworks. Verify that your use case aligns with PostgREST's architecture (a REST layer over PostgreSQL) rather than direct database access.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a running PostgREST server (>= 11) backed by PostgreSQL (>= 13); Python >= 3.9 is required.
- Low friction install with a pure-Python wheel.
- Actively maintained as of 2026-08-12, with 2557 repository stars and a release within the last 71 days.
License · maintenance · safety
MIT (permissive) — MIT license (permissive) means you can use, modify, and distribute this package with minimal restrictions in both open-source and commercial projects.
last release 2026-06-04 (71 days) · last repo commit 2026-08-12 · 2,557 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 36,967,811 downloads/mo, #730 on PyPI
Alternatives
Verify before relying
import asyncio
from postgrest import AsyncPostgrestClient
async def main():
async with AsyncPostgrestClient("http://localhost:3000") as client:
r = await client.from_("countries").select("*").execute()
print(r.data)
asyncio.run(main())- Whether the library supports synchronous (non-async) client usage patterns.
- Performance characteristics and connection pooling behavior under high concurrency.
- Full feature parity with PostgREST's query capabilities (e.g., complex filtering, aggregations).
What it is and what it does
postgrest-py is a Python client for PostgREST, a tool that automatically exposes PostgreSQL databases as REST APIs. This library wraps that REST API with an async-first, ORM-like interface, letting you write Python code to query and modify your database without writing raw SQL or HTTP requests.
You use it by instantiating an AsyncPostgrestClient pointed at your PostgREST server, then calling methods like `.from_("table_name").select(...).execute()` to fetch data, `.insert()` to add rows, `.update()` to modify them, `.delete()` to remove them, and `.rpc()` to invoke stored procedures. All operations are async and return structured response objects. The library depends on httpx for HTTP, pydantic for data validation, and a few utility packages.
Use it for
- Build a Python backend that queries a PostgreSQL database via PostgREST without managing direct database connections.
- Rapidly prototype or build a REST-to-database layer in Python when PostgREST is already deployed.
- Invoke PostgreSQL stored procedures (RPC) from Python with a clean, async-friendly API.
- Perform CRUD operations on PostgreSQL tables with an ORM-like syntax while keeping the database behind PostgREST.
- Integrate PostgREST into a Python async application (FastAPI, Starlette, etc.) for database access.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The package is actively maintained, has no known vulnerabilities, installs with low friction, and carries a permissive MIT license. It is well-positioned for projects already using PostgREST or considering it as a database abstraction layer. The async-first design fits modern Python web frameworks. Verify that your use case aligns with PostgREST's architecture (a REST layer over PostgreSQL) rather than direct database access.
Install
postgrest on PyPI
Before you install
Low friction install with a pure-Python wheel. Actively maintained as of 2026-08-12, with 2557 repository stars and a release within the last 71 days. Requires Python >= 3.9 and a running PostgREST server (>= 11) backed by PostgreSQL (>= 13).
Requires a running PostgREST server (>= 11) backed by PostgreSQL (>= 13); Python >= 3.9 is required.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package with minimal restrictions in both open-source and commercial projects.
Quickstart
import asyncio
from postgrest import AsyncPostgrestClient
async def main():
async with AsyncPostgrestClient("http://localhost:3000") as client:
r = await client.from_("countries").select("*").execute()
print(r.data)
asyncio.run(main())
Verify before relying
- Whether the library supports synchronous (non-async) client usage patterns.
- Performance characteristics and connection pooling behavior under high concurrency.
- Full feature parity with PostgREST's query capabilities (e.g., complex filtering, aggregations).
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 5 packageshttpxdeprecationpydanticstrenumyarl |
| Maintenance | Actively maintained 71 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 36,967,811 / month, #730 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3 |
Evidence: postgrest-2.31.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “postgrest python client”
- postgrestAn async Python client library that provides an ORM-like interface to…
- supabasePython client library for Supabase that provides unified access to…
- codewords-clientA Python client library for the Codewords API with built-in FastAPI…
Give your agent the search over MCP, or paste the wish link into any chat.
More Front-Ends packages
SQLAlchemy is a Python SQL toolkit and Object Relational Mapper (ORM) that provides both a high-level ORM layer for declarative object persistence and a Core SQL construction system for direct database abstraction and query building.
psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.
Alembic generates and manages database schema migrations for SQLAlchemy applications, handling version control of database structure changes with support for upgrades, downgrades, and auto-generation from model changes.
Install it if you use SQLAlchemy and need to version-control schema changes; skip it only if you manage migrations manually or use a different ORM entirely.
A Python client library for connecting to and querying Weaviate, a vector database that enables semantic search and AI-powered data retrieval.
A Python client library that connects to Databricks clusters and SQL warehouses using a Thrift-based protocol, conforming to the Python DB API 2.0 specification and supporting Arrow-based data exchange.
Install it if you need to query Databricks clusters or SQL warehouses from Python.
Psycopg 3 is a PostgreSQL database adapter for Python that enables applications to connect to, query, and manage PostgreSQL databases using Python code.
Install it if you need to connect Python to PostgreSQL.
See also supabase · nocodb-simple-client · django-pg-bulk-update · pysqlsync · python-jsonrpc-server · postgres · tortoise-orm · pgdb · fastcrud · buildpg