Acquire.Access._runrequest module¶
-
class
RunRequest(runfile=None)[source]¶ Bases:
Acquire.Access._request.RequestThis class holds a request to run a particular calculation on a RunService. The result of this request will be a PAR to which the input should be loaded, and a Bucket from which the output can be read. The calculation will start once the input has been signalled as loaded.
-
fingerprint()[source]¶ Return a unique fingerprint for this request that can be used for signing and verifying authorisations
- Returns:
- None or str: If null returns None, else returns a string combining the UID, size of tarfile and tarfile MD5 checksum as a fingerprint
-
static
from_data(data)[source]¶ Creates a RunRequest object from the JSON data in data
Parameters: data (str) – JSON deserialisable string used to create object Returns: If data contains JSON data create RunRequest object, else return None Return type: RunRequest or None
-
input_files()[source]¶ Return a dictionary of the input file information for the input files for the calculation. This is a dictionary mapping the key for each file to the filename in the tarfile, the size of the file in the tarfile and the md5 sum of the file
- Returns:
- dict or None: Dictionary of input file information if available, else None
-
is_null()[source]¶ Return whether or not this is a null request
Returns: True if UID is set, else False Return type: bool
-
runinfo()[source]¶ Return the processed run information used to describe the calculation to be run. This includes information about all of the input files, such as their names, filesizes and MD5 checksums
- Returns:
- dict: Dictionary containing information about input files, names, filesizes, MD5 checksums
-
tarfile()[source]¶ Return the name of the tarfile containing all of the input files
- Returns:
- str: Name of tarfile
-
tarfile_md5sum()[source]¶ Return the MD5 checksum of the tarfile containing the input files
- Returns:
- str: MD5 checksum of tarfile
-
tarfile_size()[source]¶ Return the size of the tarfile in bytes
Returns: Size of tarfile in bytes Return type: int
-