π Application Programming Interface#
main apps core module.
- error(text, **kwargs)#
Display an error message.
- info(text, **kwargs)#
Display an info message.
- warning(text, **kwargs)#
Display a warning.
- comment(text, **kwargs)#
Display a comment.
- prompt(text, **kwargs)#
Prompt the user.
- confirm(text, **kwargs)#
Prompt the user for a confirmation.
- class AppStyles#
Bases:
object
Styles used in aplication.
- ERROR#
Style for errors (
{"fg": "red", "bold": True}
by default).
- WARNING#
Style for warnings (
{"fg": "yellow", "bold": True}
by default).
- INFO#
Style for informations (
{"fg": "bright_magenta"}
by default).
- COMMENT#
Style for comments (
{"fg": "green"}
by default).
- QUESTION#
Style for questions (
{"fg": "cyan"}
by default).
- class Group(name=None, commands=None, invoke_without_command=False, no_args_is_help=None, subcommand_metavar=None, chain=False, result_callback=None, **kwargs)#
Bases:
Group
Group class for the GALACTIC app.
It does two things:
it detects plugins from the galactic.apps.cli.main group.
it adds an epilog to all added commands.
- add_command(cmd, name=None)#
Add a command to the group.
This method also sets the epilog of the command to the applicationβs epilog. It is useful for commands that are part of the application and should inherit the applicationβs epilog.
- classmethod detect_plugins()#
Detect plugins from the galactic.apps.cli.main group.
- Return type: