(*, force_refresh: bool = False)
| 145 | # If your token source already does its own caching, use expires_at=0 and |
| 146 | # the client will call your provider before every request instead of caching. |
| 147 | def my_provider(*, force_refresh: bool = False) -> AccessToken: # noqa: ARG001 |
| 148 | # call your internal auth service here |
| 149 | return AccessToken(token="sk-ant-oat01-...", expires_at=1775000000) |
| 150 | |
| 151 | |
| 152 | client = anthropic.Anthropic(credentials=my_provider) |
nothing calls this directly
no test coverage detected