From bcef7d65b460ff4b98abf25222c65ff47a4390d9 Mon Sep 17 00:00:00 2001 From: beckerfy <fynn.becker@hs-hannover.de> Date: Thu, 2 Aug 2018 16:42:28 +0200 Subject: [PATCH] Update README --- README.md | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 58ddcb0..33286bf 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") ``` -- GitLab