Application Web

Command line

mathenjeu.cli.qcm_app.create_https_app

mathenjeu.cli.qcm_app.create_local_app

mathenjeu.cli.create_self_signed_cert (keyfile = “key.pem”, certfile = “cert.pem”, country = “FR”, state = “Paris”, location = “Paris”, organization = “mathenjeu”, cn = “mathenjeu”, organizational_unit_name = None, email = None, size = 4096, days = 365, algo = “sha256”, fLOG = <built-in function print>)

Creates a signed certificate.

Common

mathenjeu.apps.common.AuthentificationAnswers (self, app, login_page = “login.html”, notauth_page = “notauthorized.html”, auth_page = “authorized.html”, redirect_logout = “/”, max_age = 1209600, cookie_key = None, cookie_name = “mathenjeu”, cookie_domain = “127.0.0.1”, cookie_path = “/”, secure = False, page_context = None, userpwd = None)

Defines answers for an application with authentification. It stores a cookie with only the user alias. The method authentify_user must be overwritten. The method page_context returns additional information to add before applying any template.

mathenjeu.apps.common.LogApp (self, folder = “.”, secret_log = None, fct_session = None, kwargs)

Defines methods to easily log information for a web application. The function fct_session returns information about the session whatever it is as a dictionary.

Display

mathenjeu.apps.display.DisplayQuestionChoiceHTML (self)

Renders a question into HTML.

HTML

mathenjeu.apps.display.DisplayQuestionChoiceHTML (self)

Renders a question into HTML.

Server

mathenjeu.apps.server.ServerHypercorn (self, kwargs)

Implements a server based on hypercorn.

WebApp

mathenjeu.apps.QCMApp (self, secret_log = None, folder = “.”, max_age = 1209600, cookie_key = None, cookie_name = “mathenjeu”, cookie_domain = “127.0.0.1”, cookie_path = “/”, title = “Web Application MathEnJeu”, short_title = “MathEnJeu”, page_doc = “http://www.xavierdupre.fr/app/mathenjeu/helpsphinx/”, secure = False, display = None, fct_game = None, games = None, middles = None, debug = False, userpwd = None)

Implements routes for a web application.

mathenjeu.apps.staticapp.staticfile.StaticApp