Cache

b2sdk caches the mapping between bucket name and bucket id, so that the user of the library does not need to maintain the mapping to call the api.

class b2sdk.v1.AbstractCache[source]
get_bucket_name_or_none_from_bucket_id(bucket_id: str)Optional[str][source]
class b2sdk.v1.AuthInfoCache[source]

A cache that stores data persistently in StoredAccountInfo.

__init__(info)[source]

Initialize self. See help(type(self)) for accurate signature.

get_bucket_id_or_none_from_bucket_name(name)[source]
get_bucket_name_or_none_from_bucket_id(bucket_id)Optional[str][source]
get_bucket_name_or_none_from_allowed()[source]
save_bucket(bucket)[source]
set_bucket_name_cache(buckets)[source]
class b2sdk.v1.DummyCache[source]

A cache that does nothing.

get_bucket_id_or_none_from_bucket_name(name)[source]
get_bucket_name_or_none_from_bucket_id(bucket_id: str)Optional[str][source]
get_bucket_name_or_none_from_allowed()[source]
save_bucket(bucket)[source]
set_bucket_name_cache(buckets)[source]
class b2sdk.v1.InMemoryCache[source]

A cache that stores the information in memory.

__init__()[source]

Initialize self. See help(type(self)) for accurate signature.

get_bucket_id_or_none_from_bucket_name(name)[source]
get_bucket_name_or_none_from_bucket_id(bucket_id: str)Optional[str][source]
get_bucket_name_or_none_from_allowed()[source]
save_bucket(bucket)[source]
set_bucket_name_cache(buckets)[source]