MCPcopy Create free account
hub / github.com/anthropics/anthropic-sdk-python / my_async_provider

Function my_async_provider

examples/workload_identity.py:172–174  ·  view source on GitHub ↗
(*, force_refresh: bool = False)

Source from the content-addressed store, hash-verified

170
171
172async def my_async_provider(*, force_refresh: bool = False) -> AccessToken:
173 token = await fetch_token_from_my_auth_service(force_refresh=force_refresh)
174 return AccessToken(token=token, expires_at=1775000000)
175
176
177async_client = anthropic.AsyncAnthropic(credentials=my_async_provider)

Callers

nothing calls this directly

Calls 2

AccessTokenClass · 0.90

Tested by

no test coverage detected