B2 Utility functions
- b2sdk.v2.choose_part_ranges(content_length, minimum_part_size)[source]
Return a list of (offset, length) for the parts of a large file.
- b2sdk.v2.fix_windows_path_limit(path)[source]
Prefix paths when running on Windows to overcome 260 character path length limit. See https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx#maxpath
- b2sdk.v2.format_and_scale_fraction(numerator, denominator, unit)[source]
Pick a good scale for representing a fraction, and format it.
- b2sdk.v2.format_and_scale_number(x, unit)[source]
Pick a good scale for representing a number and format it.
- b2sdk.v2.hex_sha1_of_stream(input_stream, content_length)[source]
Return the 40-character hex SHA1 checksum of the first content_length bytes in the input stream.