consolekit
Additional utilities for click.
Docs |
|
---|---|
Tests |
|
PyPI |
|
Anaconda |
|
Activity |
|
QA |
|
Other |
Installation
python3 -m pip install consolekit --user
First add the required channels
conda config --add channels https://conda.anaconda.org/conda-forge
conda config --add channels https://conda.anaconda.org/domdfcoding
Then install
conda install consolekit
python3 -m pip install git+https://github.com/domdfcoding/consolekit@master --user
Additionally, for better support in terminals,
install psutil by specifying the terminals
extra:
python -m pip install consolekit[terminals]
or, if you installed consolekit
through conda:
conda install -c conda-forge psutil
Highlights
MarkdownHelpCommand( name:Optional
[str
], context_settings:Optional
[MutableMapping
[str
,Any
]] =None
, callback:Optional
[Callable
[...,Any
]] =None
, params:Optional
[List
[Parameter
]] =None
, help:Optional
[str
] =None
, epilog:Optional
[str
] =None
, short_help:Optional
[str
] =None
, options_metavar:Optional
[str
] ='[OPTIONS]'
, add_help_option:bool
=True
, no_args_is_help:bool
=False
, hidden:bool
=False
, deprecated:bool
=False
, )
Subclass of click.Command
which treats the help text as markdown
and prints a rendered representation.
See more in consolekit.commands
.
auto_default_option( *param_decls, **attrs, ) ->Callable
[[~_C
],~_C
]
Attaches an option to the command, with a default value determined from the decorated function’s signature.
See more in consolekit.options
.
SuggestionGroup( name:Optional
[str
] =None
, commands:Union
[MutableMapping
[str
,Command
],Sequence
[Command
],None
] =None
, **attrs:Any
, )
Subclass of click.Group
which suggests the most similar command if the command is not found.
See more in consolekit.commands
.