OpenQuizz
Une application de gestion des contenus pédagogiques
|
Data Structures | |
class | AppGroup |
class | CertParamType |
class | DispatchingApp |
class | FlaskGroup |
class | NoAppException |
class | ScriptInfo |
class | SeparatedPathType |
Functions | |
def | find_best_app (script_info, module) |
def | call_factory (script_info, app_factory, arguments=()) |
def | find_app_by_string (script_info, module, app_name) |
def | prepare_import (path) |
def | locate_app (script_info, module_name, app_name, raise_if_not_found=True) |
def | get_version (ctx, param, value) |
def | with_appcontext (f) |
def | load_dotenv (path=None) |
def | show_server_banner (env, debug, app_import_path, eager_loading) |
def | run_command (info, host, port, reload, debugger, eager_loading, with_threads, cert, extra_files) |
def | shell_command () |
def | routes_command (sort, all_methods) |
def | main (as_module=False) |
Variables | |
dotenv = None | |
ssl = None | |
version_option | |
pass_script_info = click.make_pass_decorator(ScriptInfo, ensure=True) | |
cli | |
as_module | |
def flask.cli.call_factory | ( | script_info, | |
app_factory, | |||
arguments = () |
|||
) |
Takes an app factory, a ``script_info` object and optionally a tuple of arguments. Checks for the existence of a script_info argument and calls the app_factory depending on that and the arguments provided.
def flask.cli.find_app_by_string | ( | script_info, | |
module, | |||
app_name | |||
) |
Checks if the given string is a variable name or a function. If it is a function, it checks for specified arguments and whether it takes a ``script_info`` argument and calls the function with the appropriate arguments.
def flask.cli.find_best_app | ( | script_info, | |
module | |||
) |
Given a module instance this tries to find the best possible application in the module or raises an exception.
def flask.cli.get_version | ( | ctx, | |
param, | |||
value | |||
) |
def flask.cli.load_dotenv | ( | path = None | ) |
Load "dotenv" files in order of precedence to set environment variables. If an env var is already set it is not overwritten, so earlier files in the list are preferred over later files. Changes the current working directory to the location of the first file found, with the assumption that it is in the top level project directory and will be where the Python path should import local packages from. This is a no-op if `python-dotenv`_ is not installed. .. _python-dotenv: https://github.com/theskumar/python-dotenv#readme :param path: Load the file at this location instead of searching. :return: ``True`` if a file was loaded. .. versionchanged:: 1.1.0 Returns ``False`` when python-dotenv is not installed, or when the given path isn't a file. .. versionadded:: 1.0
def flask.cli.locate_app | ( | script_info, | |
module_name, | |||
app_name, | |||
raise_if_not_found = True |
|||
) |
def flask.cli.main | ( | as_module = False | ) |
def flask.cli.prepare_import | ( | path | ) |
Given a filename this will try to calculate the python path, add it to the search path and return the actual module name that is expected.
def flask.cli.routes_command | ( | sort, | |
all_methods | |||
) |
Show all registered routes with endpoints and methods.
def flask.cli.run_command | ( | info, | |
host, | |||
port, | |||
reload, | |||
debugger, | |||
eager_loading, | |||
with_threads, | |||
cert, | |||
extra_files | |||
) |
Run a local development server. This server is for development purposes only. It does not provide the stability, security, or performance of production WSGI servers. The reloader and debugger are enabled by default if FLASK_ENV=development or FLASK_DEBUG=1.
def flask.cli.shell_command | ( | ) |
Run an interactive Python shell in the context of a given Flask application. The application will populate the default namespace of this shell according to it's configuration. This is useful for executing small snippets of management code without having to manually configure the application.
def flask.cli.show_server_banner | ( | env, | |
debug, | |||
app_import_path, | |||
eager_loading | |||
) |
Show extra startup messages the first time the server is run, ignoring the reloader.
def flask.cli.with_appcontext | ( | f | ) |
Wraps a callback so that it's guaranteed to be executed with the script's application context. If callbacks are registered directly to the ``app.cli`` object then they are wrapped with this function by default unless it's disabled.
as_module |
cli |
dotenv = None |
pass_script_info = click.make_pass_decorator(ScriptInfo, ensure=True) |
ssl = None |
version_option |