MCPcopy Create free account
hub / github.com/AgentOps-AI/agentops / get_async_supabase

Function get_async_supabase

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

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

()

Source from the content-addressed store, hash-verified

36
37
38async def get_async_supabase():
39 """
40 FastAPI dependency to get the async Supabase client.
41 This allows for proper dependency injection and easier testing.
42
43 Returns:
44 AsyncSupabase: The async Supabase client instance
45 """
46
47 from agentops.api.environment import SUPABASE_KEY, SUPABASE_URL
48
49 global async_supabase
50 if async_supabase is None:
51 async with _async_supabase_lock:
52 # Check again inside the lock to prevent race conditions
53 if async_supabase is None:
54 async_supabase = AsyncSupabase(SUPABASE_URL, SUPABASE_KEY)
55 return async_supabase
56
57
58# Annotated dependencies for better type hinting

Callers 6

handle_actionsFunction · 0.90
handle_llmsFunction · 0.90
handle_toolsFunction · 0.90
handle_errorsFunction · 0.90
get_premium_statusFunction · 0.90
_get_project_idFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…