module documentation

File-based token cache used by the SDK.

This module provides TokenCache, a small asynchronous file cache that stores named nebius.aio.token.token.Token objects in a YAML file. Access to the cache is protected by a file lock (nebius.aio.token.file_cache.async_flock.Lock) to ensure concurrent processes or coroutines do not corrupt the cache.

The cache stores data in YAML under the tokens key where each token value is the mapping produced by Token.to_dict and may include an expires_at timestamp. Expired tokens are ignored and cleaned up automatically.

Example

cache = TokenCache() await cache.set("my-token", Token("abc", expiration=...)) tok = await cache.get("my-token")
Class TokenCache A simple asynchronous file-based token cache.
Variable log Undocumented

Undocumented