MCPcopy
hub / github.com/AgentOps-AI/agentops / get_supabase

Function get_supabase

app/api/agentops/api/db/supabase_client.py:18–35  ·  view source on GitHub ↗

FastAPI dependency to get the synchronous Supabase client. This allows for proper dependency injection and easier testing. Returns: Supabase: The synchronous Supabase client instance

()

Source from the content-addressed store, hash-verified

16
17
18def get_supabase():
19 """
20 FastAPI dependency to get the synchronous Supabase client.
21 This allows for proper dependency injection and easier testing.
22
23 Returns:
24 Supabase: The synchronous Supabase client instance
25 """
26
27 from agentops.api.environment import SUPABASE_KEY, SUPABASE_URL
28
29 global supabase
30 if supabase is None:
31 with _supabase_lock:
32 # Check again inside the lock to prevent race conditions
33 if supabase is None:
34 supabase = Supabase(SUPABASE_URL, SUPABASE_KEY)
35 return supabase
36
37
38async def get_async_supabase():

Callers 7

_send_invitation_emailFunction · 0.90
auth_codeFunction · 0.90
auth_loginFunction · 0.90
auth_otpFunction · 0.90
auth_oauthFunction · 0.90
auth_signupFunction · 0.90
auth_password_resetFunction · 0.90

Calls 1

SupabaseClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…