Special subclass of the :class:`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`. :param add_default_commands: if this is True then the default run and shell commands will be added. :param add_version_option: adds the ``--version`` option. :param create_app: an optional callback that is passed the script info and returns the loaded app. :param 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. :param set_debug_flag: Set the app's debug flag. .. versionchanged:: 2.2 Added the ``-A/--app``, ``--debug/--no-debug``, ``-e/--env-file`` options. .. versionchanged:: 2.2 An app context is pushed when running ``app.cli`` commands, so ``@with_appcontext`` is no longer required for those commands. .. versionchanged:: 1.0 If installed, python-dotenv will be used to load environment variables from :file:`.env` and :file:`.flaskenv` files.
Method | __init__ |
Undocumented |
Method | get |
Undocumented |
Method | list |
Undocumented |
Method | make |
Undocumented |
Method | parse |
Undocumented |
Instance Variable | create |
Undocumented |
Instance Variable | load |
Undocumented |
Instance Variable | set |
Undocumented |
Method | _load |
Undocumented |
Instance Variable | _loaded |
Undocumented |
Inherited from AppGroup
:
Method | command |
This works exactly like the method of the same name on a regular :class:`click.Group` but it wraps callbacks in :func:`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 :class:`click.Group` but it defaults the group class to :class:`AppGroup`. |
bool
= True, create_app: t.Callable[ ..., Flask]|None
= None, add_version_option: bool
= True, load_dotenv: bool
= True, set_debug_flag: bool
= True, **extra: t.Any
):
(source)
¶
Undocumented