Token Cache

For clients to delegate saving of tokens.

TokenCache – Separate token storage from token management.

exception bosdyn.client.token_cache.TokenCacheError[source]

Bases: bosdyn.client.exceptions.Error

General class of errors to handle non-response non-grpc errors.

exception bosdyn.client.token_cache.ClearFailedError[source]

Bases: bosdyn.client.token_cache.TokenCacheError

Failed to delete the token from storage.

exception bosdyn.client.token_cache.NotInCacheError[source]

Bases: bosdyn.client.token_cache.TokenCacheError

Failed to read the token from cache.

exception bosdyn.client.token_cache.WriteFailedError[source]

Bases: bosdyn.client.token_cache.TokenCacheError

Failed to write the token to storage.

bosdyn.client.token_cache.atomic_file_write(data, filename, permissions=384)[source]
class bosdyn.client.token_cache.TokenCache[source]

Bases: object

No-op default cache that serves as an interface.

read(name)[source]
clear(name)[source]
write(name, token)[source]
match(name)[source]

Returns a set of valid keys that contains the name.

class bosdyn.client.token_cache.TokenCacheFilesystem(cache_directory='~/.bosdyn/user_tokens')[source]

Bases: object

Handles transfer from in memory tokens to arbitrary storage e.g. filesystem.

read(name)[source]
clear(name)[source]
write(name, token)[source]
match(name)[source]

Returns a set of valid keys that contains the name.