Skip to main content

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

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.

Worklife VC New Sponsor

Metadata

Release files for postgrest 2.32.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for postgrest 2.32.0
File Size Uploaded
postgrest-2.32.0.tar.gz 15.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for postgrest 2.32.0
File Interpreter ABI Platform
postgrest-2.32.0-py3-none-any.whl Python 3 none any Details

Total release size: 38.8 kB

Release files / postgrest-2.32.0.tar.gz

Download URL postgrest-2.32.0.tar.gz
Size 15.1 kB
Tags Source
SHA-256 checksum
How to use checksums
20c6966d0e33d5037386fbe5bd41edd05d72748e014fbdc9d4c55308690dbe7a
BLAKE2b-256 checksum
How to use checksums
d7459010c2b79d53d0674b9dbc5e4eaa7a0a3b31f98d63707e346d3e02210380
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.2

Release files / postgrest-2.32.0-py3-none-any.whl

Download URL postgrest-2.32.0-py3-none-any.whl
Size 23.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2386155853917089510ee4e322a0f44909e9495a12ec4b3e1294ab79551a500e
BLAKE2b-256 checksum
How to use checksums
cd07219db7654f4877d590fa4a8b33012bca3ef44d0130a701d9133824a7b108
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.2

Release history Release notifications | RSS feed

This release

2.32.0 This release

2 release files

2.30.1

2 release files

2.29.0

2 release files

2.28.3

2 release files

2.28.2

2 release files

2.28.1

2 release files

2.28.0

2 release files

2.27.2

2 release files

2.27.0

2 release files

2.26.0

2 release files

2.25.1

2 release files

2.23.0

2 release files

2.22.4

2 release files

2.22.3

2 release files

2.22.2

2 release files

2.22.1

2 release files

2.20.0

2 release files

2.19.0

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.19.3

2 release files

0.19.1

2 release files

0.19.0

2 release files

0.18.0

2 release files

0.17.2

2 release files

0.17.0

2 release files

0.16.9

2 release files

0.16.4

2 release files

0.16.3

2 release files

0.16.2

2 release files

0.16.1

2 release files

0.16.0

2 release files

0.15.1

2 release files

0.15.0

2 release files

0.14.0

2 release files

0.13.2

2 release files

0.13.0

2 release files

0.12.1

2 release files

0.11.0

2 release files

0.10.6

2 release files

0.10.5

2 release files

0.10.4

2 release files

0.10.3

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page