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

Function main

examples/workload_identity.py:180–193  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

178
179
180async def main() -> None:
181 aclient = anthropic.AsyncAnthropic(
182 credentials=WorkloadIdentityCredentials(
183 identity_token_provider=IdentityTokenFile(), # uses ANTHROPIC_IDENTITY_TOKEN_FILE
184 federation_rule_id="fdrl_01...",
185 organization_id="00000000-0000-0000-0000-000000000000",
186 ),
187 )
188 msg = await aclient.messages.create(
189 model="claude-opus-5-5",
190 max_tokens=1024,
191 messages=[{"role": "user", "content": "Hello"}],
192 )
193 print(msg)
194
195
196# asyncio.run(main())

Callers

nothing calls this directly

Calls 3

IdentityTokenFileClass · 0.90
createMethod · 0.45

Tested by

no test coverage detected