civis.io.file_id_from_run_output

civis.io.file_id_from_run_output(name, job_id, run_id, regex=False, client=None)[source]

Find the file ID of a File run output with the name “name”

The run output is required to have type “File”. If using an approximate match and multiple names match the provided string, return only the first file ID.

Parameters:
name : str

The “name” field of the run output you wish to retrieve

job_id : int
run_id : int
regex : bool, optional

If False (the default), require an exact string match between name and the name of the run output. If True, search for a name which matches the regular expression name and retrieve the first found.

client : civis.APIClient, optional

If not provided, an civis.APIClient object will be created from the CIVIS_API_KEY.

Returns:
file_id : int

The ID of a Civis File with name matching name

Raises:
IOError

If the provided job ID and run ID combination can’t be found

FileNotFoundError

If the run exists, but name isn’t in its run outputs

See also

APIClient.scripts.list_containers.runs_outputs