🔌 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, **attrs)#
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)#
Registers another
Command
with this group. If the name is not provided, the name of the command is used.- Return type:
- classmethod detect_plugins()#
Detect plugins from the galactic.apps.cli.main group.
- Return type: