skillfed

postgrest

PostgREST client for Python. This library provides an ORM interface to PostgREST.

postgrest Permissive license MIT Active 2,557 v2.31.0 released

Install

postgrest on PyPI

pip

pip install postgrest

uv

uv add postgrest

poetry

poetry add postgrest

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 5 — httpx, deprecation, pydantic, strenum, yarl
Maintenance actively maintained — 70 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: postgrest-2.31.0-py3-none-any.whl

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

About postgrest

from the package's own PyPI description — quoted content, verbatim

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

```py await...

Read as markdown · JSON record · Source repository · Docs

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

An async Python client for PostgREST servers that provides ORM-like query building for PostgreSQL databases exposed via PostgREST REST APIs.

Low friction: pure-Python wheel with five lightweight dependencies. Active maintenance with a recent release 70 days ago.

MIT license (permissive): you may use, modify, and distribute this package freely in commercial or private projects with minimal restrictions.

Usage

pip install postgrest

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())

Requires Python >= 3.9, a running PostgREST server (>= 11), and PostgreSQL (>= 13) backend.

Verdict: A well-maintained async client for PostgREST with low install friction and permissive licensing. No known vulnerabilities and top-1000 PyPI popularity make it a solid choice for projects integrating Python with PostgREST-exposed PostgreSQL databases.

Needs verification

  • Whether the five runtime dependencies (httpx, pydantic, deprecation, strenum, yarl) themselves have known vulnerabilities or maintenance concerns.
  • Performance characteristics and connection pooling behavior under high concurrency.
  • Compatibility guarantees across PostgREST and PostgreSQL minor versions.
postgrest python clientasync database query builderpostgresql rest api clientorm-like postgrest interfacerest api database queriespostgrest async client

Similar packages