Acquire.Access._filewriterequest module

class FileWriteRequest(source=None, destination=None, root=None, ignore_hidden=True, account=None, testing_key=None)[source]

Bases: Acquire.Access._request.Request

This class holds a request to write a file (or files) to a remote object store

account_uid()[source]

Return the UID of the account from which payment should be taken for the file storage

accounting_service_url()[source]

Return the canonical URL of the service holding the account

authorisation()[source]

Return the authorisation behind this request

checksums()[source]

Return the checksums of the files that are requested to be written

destination_keys()[source]

Return the object store keys to which the files will be written

static expand_source_and_destination(source, destination, root=None, ignore_hidden=True)[source]

This function expands the passed source and destination objects into the list of absolute paths of local source files, and the full keys of those files once they are uploaded to the object store. This returns a pair of lists - the lists match the absolute path of the local file to the desired full key of the file in the object store

filesizes()[source]

Return the sizes of the files that are requested to be written

static from_data(data)[source]

Construct a Request from the data in the json-deserialised dictionary

is_null()[source]

Return whether or not this is a null request

resource_key()[source]

Function to return a string that can be used as a summary key for this resource request

source_filenames()[source]

Return the filenames of the files to be copied. Note that this information is only available in the copy of the object that created the request - it is not saved when this object is serialised to json as we don’t want to leak potentially sensitive data to the object store

to_data()[source]

Return this request as a json-serialisable dictionary

uid()[source]

Return the UID of this request