Mentions légales du service

Skip to content
Snippets Groups Projects
Commit e7a6810e authored by LETORT Sebastien's avatar LETORT Sebastien
Browse files

Readme updated. (partially done by C. Deltel)

parent 549a5481
1 merge request!4Client api
# A||GO python library
# A||GO API-Client python library
We provide here a simple API client for [A||GO](https://allgo18.inria.fr) written in Python.
## Description
AllGo is a SaaS (Software as a Service) platform provided by Inria. It may be seen as a virtual showroom of technonogies developed by research teams.
First follow https://allgo.inria.fr/users/sign_up to create an account on AllGo (anyone may create such an account). Once your account creation is confirmed, please connect to https://allgo.inria.fr to obtain your private token, which will allow yo to use the AllGo REST API. You will need this token later (cf. §3 below).
AllGo is a SaaS (Software as a Service) platform provided by Inria. It may be seen as a virtual showroom of technologies developed by research teams.
First follow https://allgo18.inria.fr/accounts/signup to create an account on AllGo (anyone may create such an account). Once your account creation is confirmed, please connect to https://allgo18.inria.fr to obtain your private token, which will allow yo to use the AllGo REST API. You will need this token later (cf. §3 below).
## Install
## Installing
```
# to use it
pip3 install allgo
```
pip install allgo
```
# to develop
pip3 install -r requirements.txt allgo
```
Note: to be able to generate the documentation you need to install [pandoc](http://pandoc.org/installing.html).
### Documentation
## Usage
The reference documentation is available on this website : https://allgo.gitlabpages.inria.fr/api-clients/python_client
### Create a app :
```
app = allgo.App('ndsafir', token="ead123baaef55412")
You may want to rebuild it :
``` cd doc && make html```
This will create a `_build` directory with all the html files.
## Content
```
├── allgo ............. The python code
├── doc ............... Documentations
├── MANIFEST.in ....... File needed to describe the package
├── notebooks ......... All the sample notebooks
├── README.md ......... This file !
├── requirements.txt .. List of requirements
├── setup.py .......... Package settings
└── tests ............. Directory of tests
```
NB: token in optional, if you already provide your token with an env variable ALLGO_TOKEN or create a file ~/.allgo_token (without breakline)
## Usage
### Submit a job :
### Create an Allgo object
```
client = allgo.Client('ndsafir', token="ead123baaef55412")
```
NB: token is optional if you already provide it with an env variable ALLGO_TOKEN or create a file ~/.allgo_token (without breakline)
### Submit a job
```
files = {'files[0]': open('tmp.png', 'rb')}
files = ['tmp.png']
params = '-nopeaks 1 -2dt false -noise 0 -p 1 -bits 8 -iter 5 -adapt 0'
app.run(files=files, params=params)
client.run_job(files=files, params=params)
```
run is blocking, when finish all files produce by A||Go are download in the current directory
run_job is blocking.
### More explanations ?
## Example :
Check the documention (doc dir) or the [demo notebook](notebooks/demo_short.ipynb)
[https://gitlab.inria.fr/allgo/notebooks/ndsafir](https://gitlab.inria.fr/allgo/notebooks/ndsafir)
## Example :
cf `notebooks` dir.
Also check this one
[https://gitlab.inria.fr/allgo/notebooks/ndsafir](https://gitlab.inria.fr/allgo/notebooks/ndsafir)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment