b2sdk.account_info.sqlite_account_info
– SQLite account info¶
AccountInfo class which uses a SQLite database as backend.
The database has a following schema:
-
class
b2sdk.account_info.sqlite_account_info.
SqliteAccountInfo
(file_name=None, last_upgrade_to_run=None)[source]¶ Bases:
b2sdk.account_info.upload_url_pool.UrlPoolAccountInfo
Stores account information in an sqlite database, which is used to manage concurrent access to the data.
The ‘update_done’ table tracks the schema updates that have been completed.
-
get_allowed
()[source]¶ Return ‘allowed’ dictionary info. The ‘allowed” column was not in the original schema, so it may be NULL.
- Return type
-
get_application_key_id
()[source]¶ Returns an application key ID. The ‘account_id_or_app_key_id’ column was not in the original schema, so it may be NULL.
In addition, this is the only place where we are not renaming account_id_or_app_key_id to application_key_id because it requires a column change.
application_key_id == account_id_or_app_key_id
- Return type
-
get_bucket_id_or_none_from_bucket_name
(bucket_name)[source]¶ Return bucket ID or None by a given name
-
refresh_entire_bucket_name_cache
(name_id_iterable)[source]¶ Refresh names and IDs of buckets
- Parameters
name_id_iterable – an iterable which yields bucket name and ID
-
remove_bucket_name
(bucket_name)[source]¶ Remove bucket info by a given name
- Parameters
bucket_name (str) – a bucket name
-