From f5ba014dbf0be055ab132279a2bb95970d2f2834 Mon Sep 17 00:00:00 2001 From: Andrew Smith Date: Tue, 31 Oct 2023 03:43:02 +0000 Subject: [PATCH] fix: functions-py version update --- README.md | 15 +++++++-------- pyproject.toml | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index d7d01ed9..6c50c509 100644 --- a/README.md +++ b/README.md @@ -96,6 +96,7 @@ Rough roadmap: - [ ] Remove references to GoTrue-js v1 and do a proper release - [ ] Test and document common flows (e.g. sign in with OAuth, sign in with OTP) - [ ] Add MFA methods and SSO methods + - [ ] Add Proof Key for Code Exchange (PKCE) methods - [x] Wrap [storage-py](https://github.com/supabase-community/storage-py) - [ ] Support resumable uploads - [ ] Setup testing environment @@ -212,16 +213,14 @@ 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':{}}) +def test_func(): + try: + resp = supabase.functions.invoke("hello-world", invoke_options={'body':{}}) return resp - -loop = asyncio.get_event_loop() -resp = loop.run_until_complete(test_func(loop)) -loop.close() + except (FunctionsRelayError, FunctionsHttpError) as exception: + err = exception.to_dict() + print(err.get("message")) ``` ## Storage diff --git a/pyproject.toml b/pyproject.toml index 5b8f8940..e6cded3f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "supabase" version = "2.0.0" description = "Supabase client for Python." -authors = ["Joel Lee ", "Leon Fedden ", "Daniel Reinón García ", "Leynier Gutiérrez González ", "Anand"] +authors = ["Joel Lee ", "Leon Fedden ", "Daniel Reinón García ", "Leynier Gutiérrez González ", "Anand", "Andrew Smith "] homepage = "https://github.com/supabase-community/supabase-py" repository = "https://github.com/supabase-community/supabase-py" documentation = "https://github.com/supabase-community/supabase-py"