Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
J0 authored Nov 3, 2022
1 parent 1f12755 commit be68dd4
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ The above test database is a blank supabase instance that has populated the `cou

Rough roadmap:

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

### Client Library

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

## Authenticate

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

### Supabase Functions

```python
from supabase import create_client, Client

url: str = os.environ.get("SUPABASE_TEST_URL")
key: str = os.environ.get("SUPABASE_TEST_KEY")
supabase: Client = create_client(url, key)
func = supabase.functions()

@asyncio.coroutine
async def test_func(loop):
resp = await func.invoke("hello-world",invoke_options={'body':{}})
return resp

loop = asyncio.get_event_loop()
resp = loop.run_until_complete(test_func(loop))
loop.close()
```

## Realtime Changes

Expand Down

0 comments on commit be68dd4

Please sign in to comment.