Skip to content

Latest commit

 

History

History
43 lines (26 loc) · 940 Bytes

introduction.rst

File metadata and controls

43 lines (26 loc) · 940 Bytes

Introduction

cdrouter is a simple Python wrapper for the CDRouter Web API. https://support.qacafe.com/cdrouter-web-api/

For more information on CDRouter, please visit http://www.qacafe.com/.

Download & Install

cdrouter is available on PyPI.

$ pip install -U cdrouter

Usage

import time
from cdrouter import CDRouter
from cdrouter.jobs import Job

cdr = CDRouter('http://localhost:8015', token='deadbeef')

for p in cdr.packages.list(filter=['tags@>{noretry}'], limit='none'):
    print 'Launching package ' + p.name

    j = cdr.jobs.launch(Job(package_id=p.id, extra_cli_args='-testvar myvar=example'))

    while j.result_id == None:
        time.sleep(1)
        j = cdr.jobs.get(j.id)

    print '    Result-ID: ' + j.result_id

print 'done.'