class documentation

class AppGroup(click.Group): (source)

Known subclasses: flask.cli.FlaskGroup

View In Hierarchy

This works similar to a regular click :class:`~click.Group` but it changes the behavior of the :meth:`command` decorator so that it automatically wraps the functions in :func:`with_appcontext`. Not to be confused with :class:`FlaskGroup`.

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`.
def command(self, *args, **kwargs): (source)

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

def group(self, *args, **kwargs): (source)

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