Notebook integration

We will explain in this document how to use AllGO with a python notebook.

An example is available here :

1. Install allgo module

The old client library is available at

Install it with :

pip install git+

2. Create an application

import allgo
# Display allgo API doc
client = allgo.Client(my_private_token)


token in optional, if you already provide your token with an env variable ALLGO_TOKEN or create a file ~/.allgo_token (without breakline)

3. Submit a job :

the_files = {'files[0]': open('tmp.png', 'rb')}
the_params = '-nopeaks 1 -2dt false -noise 0 -p 1 -bits 8 -iter 5 -adapt 0'
out_dict1 = client.create_job(the_app_number, params=the_params, files=the_files)
out_dict2 = client.job_status(out_dict1['id'])

In this example, we send one file ‘tmp.png’ and a string of parameters ‘params’. Run is blocking, when finish all files produce by A||Go are downloaded in the current directory. the_app_number (ndsafir) application create a file output.png in that case, so display the result with :

import matplotlib.pyplot as plt
img = mpimg.imread('output.png')

Complex GUI

You will discover in this example more complex GUI with IPyWidgets