--- id: postgrest version: "2.31.0" license: MIT license_treatment: permissive maintenance: active --- # postgrest — PostgREST client for Python. This library provides an ORM interface to PostgREST. License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install postgrest uv add postgrest poetry add postgrest ## Description # postgrest-py [PostgREST](https://postgrest.org) 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. ```sh docker-compose up ``` Once Docker Compose started, PostgREST is accessible at . ### Instructions #### With uv (recommended) ```sh uv add postgrest ``` #### With Pip ```sh pip install postgrest ``` ## USAGE ### Getting started ```py 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 ```py await client.from_("countries").insert({ "name": "Việt Nam", "capital": "Hà Nội" }).execute() ``` ### Read ```py r = await client.from_("countries").select("id", "name").execute() countries = r.data ``` ### Update ```py await... ## AI interpretation — verify before relying An async Python client for PostgREST servers that provides ORM-like query building for PostgreSQL databases exposed via PostgREST REST APIs. 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. [View on SkillFed](https://skillfed.io/packages/postgrest) · [View on PyPI](https://pypi.org/project/postgrest/)