Skip to content

Python SDK - Run(s)

Run a job

askanna.run.start

import askanna

askanna.run.start(job_name="name of the job")

#or:
askanna.run.start(job_suuid="{JOB_SUUID}")

Parameters

Name Type Required Description
job_suuid String No SUUID of the job you want to run
data Dictionary No JSON data containg an optional payload for the run
job_name String No Name of the job you want to run. Can be used as an alternative for job_suuid.
project_suuid String No Project SUUID of the project for which you want to run a job. Can be necessary in combination with job_name.

To be able to start a run, we need either the job_suuid or the job_name.

Output

Dataclass: Run

askanna.run.status

import askanna

askanna.run.status("{RUN_SUUID}")

Parameters

Name Type Required Description
suuid String No SUUID of the run you want to get the status from

Output

Dataclass: Run

Get runs

askanna.runs.get

import askanna

runs = askanna.runs.get(...)

Parameters

Name Type Required Description
runs List No List of SUUIDs of the runs you want to get the runinfo from
project String No Project SUUID of the project from which you want to get the runs
job String No Job SUUID of the job from which you want to get the runs
include_metrics Boolean No Should the output include the metrics, or not. Default value: False
include_variables Boolean No Should the output include the tracked variables, or not. Default value: False
limit Integer No Limit the number of runs you will get as a result. Default value: 100
offset Integer No Can be used in combination with limit to set how many rows should be skipped

Output

A list with Dataclass: Run & optionally a metrics object

askanna.run.get

import askanna

runs = askanna.run.get(run=...)

Parameters

Name Type Required Description
run String No Run SUUID of the runs you want to get the runinfo from
include_metrics Boolean No Should the output include the metrics, or not. Default value: False
include_variables Boolean No Should the output include the tracked variables, or not. Default value: False

Output

Dataclass: Run & optionally a metrics object