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

Method get

app/e2e/sdk-api/src/supabase.py:13–31  ·  view source on GitHub ↗
(self, table: str, columns: str, key_name: str, key_value)

Source from the content-addressed store, hash-verified

11 return self.supabase_url
12
13 async def get(self, table: str, columns: str, key_name: str, key_value):
14 logging.info(f"Retrieving {columns} for {key_name}: {key_value}")
15
16 url = f"{self.supabase_url}/rest/v1/{table}?{key_name}=eq.{key_value}&select={columns}"
17 headers = {
18 "apiKey": self.supabase_key,
19 "Authorization": f"Bearer {self.supabase_key}",
20 }
21
22 async with httpx.AsyncClient() as async_client:
23 response = await async_client.get(url, headers=headers)
24
25 json = response.json()
26 if not response.is_success:
27 raise RuntimeError(
28 f"Error retrieving {columns=} from {table=} : {json['code']=}. {json['message']=}"
29 )
30
31 return json
32
33 async def get_first(self, table: str, columns: str, key_name: str, key_value):
34 rows = await self.get(table, columns, key_name, key_value)

Callers 11

get_firstMethod · 0.95
setUpMethod · 0.45
test_completionMethod · 0.45
upsertMethod · 0.45
get_session_idsMethod · 0.45
setUpClassMethod · 0.45
__init__Method · 0.45

Calls 1

jsonMethod · 0.80

Tested by 7

setUpMethod · 0.36
test_completionMethod · 0.36
setUpClassMethod · 0.36