Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork61
PostgREST client for Python. This library provides an ORM interface to PostgREST
License
supabase/postgrest-py
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
PostgREST client for Python. This library provides an "ORM-like" interface to PostgREST.
- Python >= 3.9
- PostgreSQL >= 13
- PostgREST >= 11
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 athttp://localhost:3000.
poetry add postgrest
pip install postgrest
importasynciofrompostgrestimportAsyncPostgrestClientasyncdefmain():asyncwithAsyncPostgrestClient("http://localhost:3000")asclient:r=awaitclient.from_("countries").select("*").execute()countries=r.dataasyncio.run(main())
awaitclient.from_("countries").insert({"name":"Việt Nam","capital":"Hà Nội" }).execute()
r=awaitclient.from_("countries").select("id","name").execute()countries=r.data
awaitclient.from_("countries").update({"capital":"Hà Nội"}).eq("name","Việt Nam").execute()
awaitclient.from_("countries").delete().eq("name","Việt Nam").execute()
awaitclient.rpc("foobar", {"arg1":"value1","arg2":"value2"}).execute()
git clone https://github.com/supabase/postgrest-py.gitcd postgrest-pypoetry installpoetry run pre-commit install
poetry run pytest
Read morehere.
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.
About
PostgREST client for Python. This library provides an ORM interface to PostgREST
Topics
Resources
License
Code of conduct
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.