class FlaskGroup(AppGroup):
Special subclass of the AppGroup
group that supports
loading more commands from the configured Flask app. Normally a
developer does not have to interface with this class but there are
some very advanced use cases for which it makes sense to create an
instance of this. see :ref:`custom-scripts`.
Parameters | |
add_default_commands | if this is True then the default run and shell commands will be added. |
add_version_option | adds the --version option. |
create_app | an optional callback that is passed the script info and returns the loaded app. |
load_dotenv | Load the nearest :file:`.env` and :file:`.flaskenv` files to set environment variables. Will also change the working directory to the directory containing the first file found. |
set_debug_flag | Set the app's debug flag based on the active environment |
Method | get_command |
Undocumented |
Method | list_commands |
Undocumented |
Method | main |
Undocumented |
Method | __init__ |
Undocumented |
Method | _load_plugin_commands |
Undocumented |
Instance Variable | _loaded_plugin_commands |
Undocumented |
Instance Variable | create_app |
Undocumented |
Instance Variable | load_dotenv |
Undocumented |
Instance Variable | set_debug_flag |
Undocumented |
Inherited from AppGroup
:
Method | command |
This works exactly like the method of the same name on a regular click.Group but it wraps callbacks in with_appcontext unless it's disabled by passing with_appcontext=False. |
Method | group |
This works exactly like the method of the same name on a regular click.Group but it defaults the group class to AppGroup . |