Skip to content

List your jobs

Show your most recent jobs, newest first, with their status, verdict and reason. Handy when you've lost a job id.

list_jobs.py

# list_jobs.py - your most recent jobs
#   usage: python list_jobs.py [how many, default 10]
import os
import sys
from centific import PhysicalAI

client = PhysicalAI(
    api_key  = os.environ["CENTIFIC_API_KEY"],
    base_url = "https://humanoidiq-dev.centific.com",
)

limit = int(sys.argv[1]) if len(sys.argv) > 1 else 10
for job in client.qc.list(limit=limit):
    print(f"{job.id}   {job.status:<10} {job.verdict or '-':<9} {job.reason or ''}")

How to use it

python list_jobs.py          # the last 10
python list_jobs.py 50       # the last 50

Sample output

qcjob_yLrQuj9XZ2LxIBbVN6f8S2   complete   REJECTED
qcjob_BOUJ10ECItiEZLafDNEs4V   failed     -         mixed_data_types
qcjob_rcIHcgbbPfu8WDz8qI0nDm   cancelled  -         cancelled_by_customer