# mistralclient.shell module

Command-line interface to the Mistral APIs

class mistralclient.shell.BashCompletionCommand(app: _app.App, app_args: Namespace | None, cmd_name: str | None = None)

  Bases: `Command`

  Prints all of the commands and options for bash-completion.

  log: logging.Logger = <Logger mistralclient.shell.BashCompletionCommand (WARNING)>
  take_action(parsed_args)

    Override to do something useful.

    The returned value will be returned by the program.

class mistralclient.shell.HelpAction(option_strings, dest, nargs=None, const=None, default=None, type=None, choices=None, required=False, help=None, metavar=None, deprecated=False)

  Bases: `Action`

  Custom help action.

  Provide a custom action so the -h and –help options to the main app will print a list of the commands.

  The commands are determined by checking the CommandManager instance, passed in as the “default” value for the action.

class mistralclient.shell.MistralShell

  Bases: `App`

  build_option_parser(description, version, argparse_kwargs=None)

    Return an argparse option parser for this application.

    Subclasses may override this method to extend the parser with more global options.

    Parameters:

      - description (str) – full description of the application

      - version (str) – version number for the application

      - argparse_kwargs – extra keyword argument passed to the ArgumentParser constructor

  configure_logging()

    Create logging handlers for any log output.

  initialize_app(argv)

    Hook for subclasses to take global initialization action after the arguments are parsed but before a command is run. Invoked only once, even in interactive mode.

    Parameters:

      argv – List of arguments, including the subcommand to run. Empty for interactive mode.

class mistralclient.shell.OpenStackHelpFormatter(prog, indent_increment=2, max_help_position=32, width=None)

  Bases: `HelpFormatter`

  start_section(heading)

mistralclient.shell.env(*args, **kwargs)

  Returns the first environment variable set.

  If all are empty, defaults to ‘’ or keyword arg default.

mistralclient.shell.main(argv=['-b', 'html', 'doc/source', 'debian/python3-mistralclient/usr/share/doc/python3-mistralclient/html'])

this page last updated: 2026-03-26 21:31:21

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

found an error? report a bug