|
def | __init__ (self, add_default_commands=True, create_app=None, add_version_option=True, load_dotenv=True, set_debug_flag=True, **extra) |
|
def | get_command (self, ctx, name) |
|
def | list_commands (self, ctx) |
|
def | main (self, *args, **kwargs) |
|
def | command (self, *args, **kwargs) |
|
def | group (self, *args, **kwargs) |
|
def | __init__ (self, name=None, commands=None, **attrs) |
|
def | add_command (self, cmd, name=None) |
|
Public Member Functions inherited from MultiCommand |
def | __init__ (self, name=None, invoke_without_command=False, no_args_is_help=None, subcommand_metavar=None, chain=False, result_callback=None, **attrs) |
|
def | collect_usage_pieces (self, ctx) |
|
def | format_options (self, ctx, formatter) |
|
def | resultcallback (self, replace=False) |
|
def | format_commands (self, ctx, formatter) |
|
def | parse_args (self, ctx, args) |
|
def | invoke (self, ctx) |
|
def | resolve_command (self, ctx, args) |
|
Public Member Functions inherited from Command |
def | __init__ (self, name, context_settings=None, callback=None, params=None, help=None, epilog=None, short_help=None, options_metavar="[OPTIONS]", add_help_option=True, no_args_is_help=False, hidden=False, deprecated=False) |
|
def | get_usage (self, ctx) |
|
def | get_params (self, ctx) |
|
def | format_usage (self, ctx, formatter) |
|
def | get_help_option_names (self, ctx) |
|
def | get_help_option (self, ctx) |
|
def | make_parser (self, ctx) |
|
def | get_help (self, ctx) |
|
def | get_short_help_str (self, limit=45) |
|
def | format_help (self, ctx, formatter) |
|
def | format_help_text (self, ctx, formatter) |
|
def | format_epilog (self, ctx, formatter) |
|
Public Member Functions inherited from BaseCommand |
def | __init__ (self, name, context_settings=None) |
|
def | __repr__ (self) |
|
def | make_context (self, info_name, args, parent=None, **extra) |
|
def | main (self, args=None, prog_name=None, complete_var=None, standalone_mode=True, **extra) |
|
def | __call__ (self, *args, **kwargs) |
|
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.
For information as of why this is useful 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 based on the active
environment
.. versionchanged:: 1.0
If installed, python-dotenv will be used to load environment variables
from :file:`.env` and :file:`.flaskenv` files.