Skip to content

Python SDK - Jobs

askanna.job.list

import askanna

askanna.job.list()

Parameters

Name Type Required Description
project_suuid String No Project SUUID of the project for which you want to get a list of jobs

If you don’t specify the project_suuid, you will get a list with all jobs you have access too.

Output

List with elements with Dataclass: Job

askanna.job.get_job_by_name

import askanna

job = askanna.job.get_job_by_name(job_name="Name of the Job")

Parameters

Name Type Required Description
job_name String Yes Name of the job you want to get the job info from
project_suuid String No Project SUUID of the project for which you want to get the job info from. Can be necessary in combination with job_name.

Output

Dataclass: Job

Multiple jobs with the same name

In case multiple jobs with the same name exist, you will see an error message. In that case you can add the project_suuid for which you want to get the job information.

askanna.job.change

import askanna

askanna.job.change(suuid="Job SUUID", name=..., description=...)

Parameters

Name Type Required Description
suuid String Yes SUUID of the job you want to change
name String No New name for the job
description String No New description for the job

At least a new name, or a new description should be provided.

Changed the job name? Then update the askanna.yml as well.

Changing the name of a job can be useful in case you want to rename your job. If you are going to rename the job, don't forget to rename the job in the askanna.yml.

If you don't do this, you will not be able to run the job anymore because there is no matching job definition in the askanna.yml config. And if you don't change it in the askanna.yml file, the next time you push a new version of your code to AskAnna we will create a new job using the old name.

Output

Dataclass: Job