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

Function get_s3_client

app/api/agentops/api/storage.py:22–35  ·  view source on GitHub ↗

Maintain a single global instance of the S3 client

()

Source from the content-addressed store, hash-verified

20
21
22def get_s3_client() -> boto3.client:
23 """Maintain a single global instance of the S3 client"""
24 global _s3_client_instance
25
26 if _s3_client_instance is None:
27 _s3_client_instance = boto3.client(
28 's3',
29 endpoint_url=f"{SUPABASE_URL}/storage/v1/s3",
30 aws_access_key_id=SUPABASE_S3_ACCESS_KEY_ID,
31 aws_secret_access_key=SUPABASE_S3_SECRET_ACCESS_KEY,
32 config=Config(signature_version='s3v4'),
33 region_name='us-west-1',
34 )
35 return _s3_client_instance
36
37
38class ObjectUploadResponse(BaseModel):

Callers 2

get_trace_logsFunction · 0.90
__call__Method · 0.85

Calls 2

clientMethod · 0.80
ConfigClass · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…