Skip to content

Commit be68dd4

Browse files
authored
Update README.md
1 parent 1f12755 commit be68dd4

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

README.md

+21-2
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,13 @@ The above test database is a blank supabase instance that has populated the `cou
8585

8686
Rough roadmap:
8787

88-
- [ ] Wrap [Postgrest-py](https://github.com/supabase/postgrest-py/)
88+
- [x] Wrap [Postgrest-py](https://github.com/supabase/postgrest-py/)
8989
- [ ] Wrap [Realtime-py](https://github.com/supabase/realtime-py)
9090
- [x] Wrap [Gotrue-py](https://github.com/J0/gotrue-py)
9191

9292
### Client Library
9393

94-
This is a sample of how you'd use supabase-py. Functions and tests are WIP
94+
This is a sample of how you'd use supabase-py.
9595

9696
## Authenticate
9797

@@ -170,6 +170,25 @@ supabase: Client = create_client(url, key)
170170
data = supabase.table("countries").delete().eq("id", 1).execute()
171171
```
172172

173+
### Supabase Functions
174+
175+
```python
176+
from supabase import create_client, Client
177+
178+
url: str = os.environ.get("SUPABASE_TEST_URL")
179+
key: str = os.environ.get("SUPABASE_TEST_KEY")
180+
supabase: Client = create_client(url, key)
181+
func = supabase.functions()
182+
183+
@asyncio.coroutine
184+
async def test_func(loop):
185+
resp = await func.invoke("hello-world",invoke_options={'body':{}})
186+
return resp
187+
188+
loop = asyncio.get_event_loop()
189+
resp = loop.run_until_complete(test_func(loop))
190+
loop.close()
191+
```
173192

174193
## Realtime Changes
175194

0 commit comments

Comments
 (0)