Basic usage

Configuration

A basic usage of the Qarnot require a configuration file (eg: qarnot.conf). Here is a basic one, check Connection for details.

1[cluster]
2# url of the REST API
3url=https://api.qarnot.com
4[client]
5# auth string of the client
6token=token

Script

And here is a little sample to start a task running your myscript.py Python script.

1import qarnot
2
3 conn = qarnot.connection.Connection('qarnot.conf')
4 task = conn.create_task('hello world', 'ubuntu')
5 task.constants['DOCKER_CMD'] = 'echo hello world from ${FRAME_ID}!'
6 task.run()
7 print(task.stdout())