Write intent
- class b2sdk.v2.WriteIntent[source]
Wrapper for outbound source that defines destination offset.
- __init__(outbound_source, destination_offset=0)[source]
- Parameters:
outbound_source (b2sdk.v2.OutboundTransferSource) – data source (remote or local)
destination_offset (int) – point of start in destination file
- get_content_sha1()[source]
Return a 40-character string containing the hex SHA1 checksum, which can be used as the large_file_sha1 entry.
This method is only used if a large file is constructed from only a single source. If that source’s hash is known, the result file’s SHA1 checksum will be the same and can be copied.
If the source’s sha1 is unknown and can’t be calculated, None is returned.
- classmethod wrap_sources_iterator(outbound_sources_iterator)[source]
Helper that wraps outbound sources iterator with write intents.
Can be used in cases similar to concatenate to automatically compute destination offsets
- Param:
iterator[b2sdk.v2.OutboundTransferSource] outbound_sources_iterator: iterator of outbound sources
- Return type:
generator[b2sdk.v2.WriteIntent]