quantlab.acquisition.massive.client.ObjectStore#

class quantlab.acquisition.massive.client.ObjectStore(*args, **kwargs)[source]#

Bases: Protocol

The S3 seam: the size of a key, and the bytes of a range of it in chunks.

Both raise MassiveNotPublishedError, MassiveEntitlementError or MassiveTransportError; read may raise it after yielding some chunks, when its stream breaks. Both are called from several threads. etag names the object size last read (None when the store cannot name it: its download then never resumes), and read given if_match raises MassiveObjectChangedError when the object no longer has that ETag.

etag(key)[source]#

Return the ETag size last read for key, else None.

read(key, start, stop, if_match=None)[source]#

Return the object’s bytes start up to (not including) stop, in chunks.

size(key)[source]#

Return the object’s size in bytes.