Spaces:
Sleeping
Sleeping
Update get_supabase.py
Browse files- get_supabase.py +7 -8
get_supabase.py
CHANGED
@@ -1,17 +1,16 @@
|
|
1 |
-
import os
|
2 |
-
from supabase import create_client,Client
|
3 |
-
from
|
4 |
|
5 |
-
class Supabase
|
6 |
def __init__(self):
|
7 |
pass
|
8 |
|
9 |
-
def init_supabase_client(self):
|
10 |
load_dotenv()
|
11 |
try:
|
12 |
-
client
|
13 |
-
|
14 |
return client
|
15 |
-
except
|
16 |
print(f"Error initializing Supabase client: {e}")
|
17 |
return None
|
|
|
1 |
+
import os
|
2 |
+
from supabase import create_client, Client
|
3 |
+
from dotenv import load_dotenv
|
4 |
|
5 |
+
class Supabase:
|
6 |
def __init__(self):
|
7 |
pass
|
8 |
|
9 |
+
def init_supabase_client(self):
|
10 |
load_dotenv()
|
11 |
try:
|
12 |
+
client: Client = create_client(os.getenv("SUPABASE_URL"), os.getenv("SUPABASE_KEY"))
|
|
|
13 |
return client
|
14 |
+
except Exception as e:
|
15 |
print(f"Error initializing Supabase client: {e}")
|
16 |
return None
|