app module

app.create_set_file(req, files)

Create the setting file from a submitted form

Parameters:
reqImmutableMultiDict[str, str]

form submitted

fileslist

names of association files

Returns:
uniquestr

unique created to save the files.

errorNone

something went wrong in file creation. Unique was created, but is added to not used

Raises:
KeyError

a parameter from the form is missing. The form is not consistent

IndexError

a parameter from the form is missing. The form is not consistent

app.index()

Path: / . Index page. Here there is the form to submit a task. Methods allowed: GET

Returns:
str

Index page

app.loader()

Path: /loader . Page to witch the form is submitted. Handles form checking and captcha checking. Methods allowed: POST

Returns:
pagestr

loader.html page. This page has the prompt where the websocket communication prints the status of the task.

page_errorstr

If the form is not consistent an error page 400 is returned. If test recaptcha failed error page 401 is returned.

app.showdata()

Path: /showdata . Page showing results of the task. Unique is passed as an argument in the link (name) Methods allowed: GET

Returns:
pagestr

data.html page

page_errorstr

Error page 400 if unique doesn’t exist

app.showimg()

Path: /showimg . Api to get a result image. Arguments: ‘name’ for the unique, ‘img’ for the image name, and ‘as_attachment’. Set as_attachment to ‘yes’ to download the file. Methods allowed: GET

Returns:
pagestr

image as page or image as attachment

page_errorstr

Error page 400 if unique or image doesn’t exist

app.showtxt()

Path: /showtxt . Api to get file txt with results. Arguments: ‘name’ for the unique and ‘as_attachment’. Set as_attachment to ‘yes’ to download the file. Methods allowed: GET

Returns:
pagestr

file txt as page or file as attachment

page_errorstr

Error page 400 if unique doesn’t exist