b2sdk.transferer.range

class b2sdk.transferer.range.Range(start, end)[source]

Bases: object

HTTP ranges use an inclusive index at the end.

__init__(start, end)[source]

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

as_tuple()[source]
classmethod from_header(raw_range_header)[source]

factory method which returns an object constructed from Range http header

raw_range_header example: ‘bytes 0-11’

size()[source]
subrange(sub_start, sub_end)[source]

Returns a range that is part of this range. :param sub_start: Index relative to the start of this range. :param sub_end: (Inclusive!) index relative to the start of this range. :return: A new Range