class documentation

class FlaskGroup(AppGroup):

View In Hierarchy

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`.

Changed in version 1.0: If installed, python-dotenv will be used to load environment variables from :file:`.env` and :file:`.flaskenv` files.
Parameters
add​_default​_commandsif this is True then the default run and shell commands will be added.
add​_version​_optionadds the --version option.
create​_appan optional callback that is passed the script info and returns the loaded app.
load​_dotenvLoad 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​_flagSet 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.
def get_command(self, ctx, name):

Undocumented

def list_commands(self, ctx):

Undocumented

def main(self, *args, **kwargs):

Undocumented

def __init__(self, add_default_commands=True, create_app=None, add_version_option=True, load_dotenv=True, set_debug_flag=True, **extra):

Undocumented

def _load_plugin_commands(self):

Undocumented

_loaded_plugin_commands: bool =

Undocumented

create_app =

Undocumented

load_dotenv =

Undocumented

set_debug_flag =

Undocumented