inginious.client package

Submodules

inginious.client.client module

inginious.client.client_buffer module

Contains ClientBuffer, which creates a buffer for a Client

class inginious.client.client_buffer.ClientBuffer(client)[source]

Bases: object

A buffer for a Client

get_result(bjobid)[source]

Get the result of task. Must only be called ONCE, AFTER the task is done (after a successfull call to is_done). :return a tuple (result, grade, problems, tests, custom, archive) result is itself a tuple containing the result string and the main feedback (i.e. (‘success’, ‘You succeeded’) grade is a number between 0 and 100 indicating the grade of the users problems is a dict of tuple, in the form {‘problemid’: result} test is a dict of tests made in the container custom is a dict containing random things set in the container archive is either None or a bytes containing a tgz archive of files from the job

is_done(bjobid)[source]

Return true if the job is done

is_waiting(bjobid)[source]

Return true if the job is in queue

new_job(task, inputdata, launcher_name='Unknown', debug=False)[source]

Runs a new job. It works exactly like the Client class, instead that there is no callback

inginious.client.client_sync module

A synchronized “layer” for Client

class inginious.client.client_sync.ClientSync(client)[source]

Bases: object

Runs job synchronously

new_job(task, inputdata, launcher_name='Unknown', debug=False)[source]

Runs a new job. It works exactly like the Client class, instead that there is no callback and directly returns result, in the form of a tuple (result, grade, problems, tests, custom, archive).