Data classes

class b2sdk.v1.FileVersionInfo(id_, file_name, size, content_type, content_sha1, file_info, upload_timestamp, action)[source]

A structure which represents a version of a file (in B2 cloud).

Variables
  • id_ (str) – fileId

  • file_name (str) – full file name (with path)

  • size (int or None) – size in bytes, can be None (unknown)

  • content_type (str) – RFC 822 content type, for example "application/octet-stream"

  • content_sha1 (str or None) – sha1 checksum of the entire file, can be None (unknown) if it is a large file uploaded by a client which did not provide it

  • file_info (dict) – file info dict

  • upload_timestamp (int or None) – in milliseconds since epoch. Can be None (unknown).

  • action (str) – "upload", "hide" or "delete"

class b2sdk.v1.FileIdAndName(file_id, file_name)[source]

A structure which represents a B2 cloud file with just file_name and fileId attributes.

Used to return data from calls to b2sdk.v1.Bucket.delete_file_version().

Variables
  • file_id (str) – fileId

  • file_name (str) – full file name (with path)

class b2sdk.v1.UnfinishedLargeFile[source]

A structure which represents a version of a file (in B2 cloud).

Variables
  • file_id (str) – fileId

  • file_name (str) – full file name (with path)

  • account_id (str) – account ID

  • bucket_id (str) – bucket ID

  • content_type (str) – RFC 822 content type, for example "application/octet-stream"

  • file_info (dict) – file info dict

class b2sdk.v1.Part(file_id, part_number, content_length, content_sha1)[source]

A structure which represents a part of a large file upload.

Variables
  • file_id (str) – fileId

  • part_number (int) – part number, starting with 1

  • content_length (str) – content length, in bytes

  • content_sha1 (str) – checksum