diff --git a/README.md b/README.md index 58ddcb0ed1a00e35d32e79487f950383e2cc4acf..33286bf71ca9de5ebcb9092525d5afad2044dc84 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,25 @@ A very basic POSTGREST client and utils #### Setup + +##### Django - add `"postgrestutils"` to your `INSTALLED_APPS` setting - add `POSTGREST_UTILS_BASE_URI` (should default to the most frequently used POSTGREST instance in the future) and `POSTGREST_UTILS_JWT` to your project settings +```python +from postgrestutils.client import pgrest_client +pgrest_client.get("kerbals?select=id,forename") +``` + +##### Other projects -#### Usage ```python -from postgrestutils import postgrest_client -postgrest_client.get("kerbals?select=id,forename") +from postgrestutils import settings + +settings.BASE_URI = "http://localhost:3000" +settings.JWT = "" + +from postgrestutils.client import pgrest_client + +res = pgrest_client.get("kerbals?select=id,forename") ```