b2sdk.file_version – File version

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

Bases: object

__init__(file_id, file_name)[source]

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

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

Bases: object

LS_ENTRY_TEMPLATE = '%83s %6s %10s %8s %9d %s'
__init__(id_, file_name, size, content_type, content_sha1, file_info, upload_timestamp, action)[source]

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

as_dict()[source]
classmethod format_folder_ls_entry(name)[source]
format_ls_entry()[source]
class b2sdk.file_version.FileVersionInfoFactory[source]

Bases: object

classmethod from_api_response(file_info_dict, force_action=None)[source]

turns this:

{
    "action": "hide",
    "fileId": "4_zBucketName_f103b7ca31313c69c_d20151230_m030117_c001_v0001015_t0000",
    "fileName": "randomdata",
    "size": 0,
    "uploadTimestamp": 1451444477000
}

or this:

{
    "accountId": "4aa9865d6f00",
    "bucketId": "547a2a395826655d561f0010",
    "contentLength": 1350,
    "contentSha1": "753ca1c2d0f3e8748320b38f5da057767029a036",
    "contentType": "application/octet-stream",
    "fileId": "4_z547a2a395826655d561f0010_f106d4ca95f8b5b78_d20160104_m003906_c001_v0001013_t0005",
    "fileInfo": {},
    "fileName": "randomdata"
}

into a FileVersionInfo object

classmethod from_cancel_large_file_response(response)[source]