File tree 1 file changed +21
-2
lines changed
1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -85,13 +85,13 @@ The above test database is a blank supabase instance that has populated the `cou
85
85
86
86
Rough roadmap:
87
87
88
- - [ ] Wrap [ Postgrest-py] ( https://github.com/supabase/postgrest-py/ )
88
+ - [x ] Wrap [ Postgrest-py] ( https://github.com/supabase/postgrest-py/ )
89
89
- [ ] Wrap [ Realtime-py] ( https://github.com/supabase/realtime-py )
90
90
- [x] Wrap [ Gotrue-py] ( https://github.com/J0/gotrue-py )
91
91
92
92
### Client Library
93
93
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.
95
95
96
96
## Authenticate
97
97
@@ -170,6 +170,25 @@ supabase: Client = create_client(url, key)
170
170
data = supabase.table(" countries" ).delete().eq(" id" , 1 ).execute()
171
171
```
172
172
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
+ ```
173
192
174
193
## Realtime Changes
175
194
You can’t perform that action at this time.
0 commit comments