Nassiraaa commited on
Commit
6d6fef1
·
verified ·
1 Parent(s): 30536dd

Create get_supabase.py

Browse files
Files changed (1) hide show
  1. get_supabase.py +17 -0
get_supabase.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
14
+ return client
15
+ except Exception as e :
16
+ print(f"Error initializing Supabase client: {e}")
17
+ return None