module documentation
Asynchronous renewable file-backed bearer.
This module provides an asynchronous variant of the renewable file-backed
bearer which uses a ThrottledTokenCache and runs a background
refresh task. The implementation exposes two primary classes:
AsynchronousRenewableFileCacheReceiver-- An async receiver that- prefers the cached token when it's fresh and, when required, requests a renewal from the wrapped bearer. It implements a limited retry strategy.
AsynchronousRenewableFileCacheBearer-- A bearer that wraps an- existing
nebius.aio.token.token.Bearerand manages a background refresh loop that persists tokens to a file-backed cache.
Example
Create an asynchronous renewable bearer from a named network bearer:
async_bearer = AsynchronousRenewableFileCacheBearer(network_bearer) token = await async_bearer.receiver().fetch()
| Class | |
Asynchronous bearer that refreshes tokens into a file-backed cache. |
| Class | |
Receiver that requests asynchronous renewals when needed. |
| Constant | VERY |
A very long timeout used when a token has no expiration. |
| Type Variable | T |
Undocumented |
| Variable | log |
Undocumented |
A very long timeout used when a token has no expiration.
This constant is used as an effectively infinite timeout value when calculating retry intervals for tokens that carry no expiration time.
| Value |
|