onedrive.upload_helper module

Streaming upload helper.

class onedrive.upload_helper.FileSegment(fileobj, start, length, total)[source]

Bases: io.IOBase

Implements a file segment object that mimicks a binary file object.

read(size=-1)[source]

Read up to the end of fragment.

onedrive.upload_helper.put_file_segment(session, url, segment, start, length, total, timeout=None, retries=5, path=None)[source]

PUT a file segment already loaded into a bytes object.

onedrive.upload_helper.stream_put_file_segment(session, url, fileobj, start, length, total, timeout=None, retries=5, path=None)[source]

PUT a file segment using requests’ streaming upload feature.

Previous topic

onedrive.save module

Next topic

onedrive.util module

This Page