Undocumented
Class | AppGroup |
This works similar to a regular click ~click.Group but it changes the behavior of the command decorator so that it automatically wraps the functions in with_appcontext . |
Class | FlaskGroup |
No summary |
Class | ScriptInfo |
No summary |
Function | load_dotenv |
Load "dotenv" files in order of precedence to set environment variables. |
Function | with_appcontext |
No summary |
Variable | cli |
Undocumented |
Variable | dotenv |
Undocumented |
Variable | pass_script_info |
Undocumented |
Variable | ssl |
Undocumented |
Variable | version_option |
Undocumented |
Class | CertParamType |
Click option type for the --cert option. Allows either an existing file, the string 'adhoc', or an import for a ~ssl.SSLContext object. |
Class | DispatchingApp |
No summary |
Class | NoAppException |
Raised if an application cannot be found or loaded. |
Class | SeparatedPathType |
Click option type that accepts a list of values separated by the OS's path separator (:, ; on Windows). Each value is validated as a click.Path type. |
Function | _called_with_wrong_args |
Check whether calling a function raised a TypeError because the call failed or because something in the factory raised the error. |
Function | _path_is_ancestor |
Take other and remove the length of path from it. Then join it to path. If it is the original value, path is an ancestor of other. |
Function | _validate_key |
The --key option must be specified when --cert is a file. Modifies the cert param to be a (cert, key) pair if needed. |
Function | call_factory |
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. |
Function | find_app_by_string |
Check if the given string is a variable name or a function. Call a function to get the app instance, or return the variable directly. |
Function | find_best_app |
Given a module instance this tries to find the best possible application in the module or raises an exception. |
Function | get_version |
Undocumented |
Function | locate_app |
Undocumented |
Function | main |
Undocumented |
Function | prepare_import |
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. |
Function | routes_command |
Show all registered routes with endpoints and methods. |
Function | run_command |
Run a local development server. |
Function | 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 its configuration. |
Function | show_server_banner |
Show extra startup messages the first time the server is run, ignoring the reloader. |
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.
This is a no-op if python-dotenv is not installed.
Parameters | |
path | Load the file at this location instead of searching. |
Returns | |
True if a file was loaded. |
Parameters | |
f | The function that was called. |
Returns | |
True if the call failed. |
Parameters | |
sort:str | Undocumented |
all_methods:bool | Undocumented |
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.
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 its configuration.
This is useful for executing small snippets of management code without having to manually configure the application.