From 912a4420e9dc9c098cd49ad5cb7631ac86cb2b89 Mon Sep 17 00:00:00 2001 From: Garrett Braatz Date: Thu, 2 Jun 2022 19:19:30 -0700 Subject: [PATCH 1/2] fix: pass schema to postgrest init --- supabase/client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/supabase/client.py b/supabase/client.py index 0a779146..27286bb1 100644 --- a/supabase/client.py +++ b/supabase/client.py @@ -58,6 +58,7 @@ def __init__( rest_url=self.rest_url, supabase_key=self.supabase_key, headers=options.headers, + schema=options.schema ) def storage(self) -> SupabaseStorageClient: @@ -154,9 +155,10 @@ def _init_postgrest_client( rest_url: str, supabase_key: str, headers: Dict[str, str], + schema: str ) -> SyncPostgrestClient: """Private helper for creating an instance of the Postgrest client.""" - client = SyncPostgrestClient(rest_url, headers=headers) + client = SyncPostgrestClient(rest_url, headers=headers, schema=schema) client.auth(token=supabase_key) return client From c71261feccfa3037a8461e6e66bd4d57ca6207ea Mon Sep 17 00:00:00 2001 From: Garrett Braatz Date: Sun, 5 Jun 2022 22:43:34 -0700 Subject: [PATCH 2/2] style: reformat client.py using black --- supabase/client.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/supabase/client.py b/supabase/client.py index 27286bb1..007b6d1e 100644 --- a/supabase/client.py +++ b/supabase/client.py @@ -58,7 +58,7 @@ def __init__( rest_url=self.rest_url, supabase_key=self.supabase_key, headers=options.headers, - schema=options.schema + schema=options.schema, ) def storage(self) -> SupabaseStorageClient: @@ -152,10 +152,7 @@ def _init_supabase_auth_client( @staticmethod def _init_postgrest_client( - rest_url: str, - supabase_key: str, - headers: Dict[str, str], - schema: str + rest_url: str, supabase_key: str, headers: Dict[str, str], schema: str ) -> SyncPostgrestClient: """Private helper for creating an instance of the Postgrest client.""" client = SyncPostgrestClient(rest_url, headers=headers, schema=schema)