Settings

Don’t worry about name encoding, these classes handle it for you!

Cors

class backblaze.settings.CorSettings(name: str, origins: list, allowed_headers: list, operations: list, expose_headers: list, max_age: int)
Parameters
  • name (str) –

  • origins (list) –

  • allowed_headers (list) –

  • operations (list) –

  • expose_headers (list) –

  • max_age (int) –

Lifecycle

class backblaze.settings.LifecycleSettings(hiding_to_delete: int, uploading_to_hide: int, prefix: str)
Parameters
  • hiding_to_delete (int) –

  • uploading_to_hide (int) –

  • prefix (str) –

Bucket Update

class backblaze.settings.BucketUpdateSettings(private: bool = True, info: Optional[str] = None, cors: Optional[List[backblaze.settings.CorSettings]] = None, lifecycle: Optional[backblaze.settings.LifecycleSettings] = None)
Parameters
  • private (bool, optional) – by default True

  • info (str, optional) – by default None

  • cors (List[CorSettings], optional) – by default None

  • lifecycle (LifecycleSettings, optional) – by default None

Bucket

class backblaze.settings.BucketSettings(name: str, *args, **kwargs)
Parameters
  • name (str) –

  • private (bool, optional) – by default None

  • info (str, optional) – by default None

  • cors (List[CorSettings], optional) – by default None

  • lifecycle (LifecycleSettings, optional) – by default None

Key

class backblaze.settings.KeySettings(capabilities: list, name: str, duration: Optional[int] = None, bucket_id: Optional[str] = None, prefix: Optional[str] = None)
Parameters
  • capabilities (list) –

  • name (str) –

  • duration (int, optional) – by default None

  • bucket_id (str, optional) – by default None

  • prefix (str, optional) – by default None

File

class backblaze.settings.FileSettings(start_name: Optional[str] = None, limit: int = 100, prefix: str = '', delimiter: Optional[str] = None)
Parameters
  • start_name (str, optional) – by default None

  • limit (int, optional) – by default 100

  • prefix (str, optional) – by default “”

  • delimiter (str, optional) – by default None

Download

class backblaze.settings.DownloadSettings(range: Optional[int] = None, disposition: Optional[str] = None, language: Optional[str] = None, expires: Optional[datetime.datetime] = None, cache_control: Optional[str] = None, encoding: Optional[str] = None, content_type: Optional[str] = None)
Parameters
  • range (int, optional) – by default None

  • disposition (str, optional) – by default None

  • language (str, optional) – by default None

  • expires (datetime, optional) – by default None

  • cache_control (str, optional) – by default None

  • encoding (str, optional) – by default None

  • content_type (str, optional) – by default None

Upload

class backblaze.settings.UploadSettings(name: str, content_type: str = 'b2/x-auto', last_modified: Optional[datetime.datetime] = None, disposition: Optional[str] = None, language: Optional[str] = None, expires: Optional[datetime.datetime] = None, cache_control: Optional[str] = None, encoding: Optional[str] = None, custom_headers: Optional[Dict[str, str]] = None)
Parameters
  • name (str) –

  • content_type (str, optional) – by default “b2/x-auto”

  • last_modified (datetime, optional) – by default None

  • disposition (str, optional) – by default None

  • language (str, optional) – by default None

  • expires (datetime, optional) – by default None

  • cache_control (str, optional) – by default None

  • encoding (str, optional) – by default None

  • custom_headers (Dict[str, str], optional) – by default None

Part

class backblaze.settings.PartSettings(name: str, content_type: str = 'b2/x-auto', last_modified: Optional[datetime.datetime] = None, sha1: Optional[str] = None)
Parameters
  • name (str) –

  • content_type (str, optional) – by default “b2/x-auto”

  • last_modified (datetime, optional) – by default None

  • sha1 (str, optional) – by default None

Copy File

class backblaze.settings.CopyFileSettings(name: str, content_type: Optional[str] = None, destination_bucket_id: Optional[str] = None, range: Optional[int] = None, directive: Optional[str] = None, info: Optional[dict] = None)
Parameters
  • name (str) –

  • content_type (str, optional) – by default None

  • destination_bucket_id (str, optional) – by default None

  • range (int, optional) – by default None

  • directive (str, optional) – by default None

  • info (dict, optional) – by default None

Copy File Part

class backblaze.settings.CopyPartSettings(file_id: str, range: Optional[int] = None)
Parameters
  • file_id (str) –

  • range (int, optional) – by default None