File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 1+ # Minimal command-line interface plugin for [ minimal-pba-cli] ( https://github.com/easy-as-python/minimal-pba-cli )
2+
3+ This is a minimal example of a plugin that can be discovered, installed, and used in a command-line interface using a plugin-based architecture.
4+
5+ ## Key moving parts
6+
7+ The main components of a working plugin are:
8+
9+ - The distribution name: Plugins must have a distribution name with a known prefix (in the case of this project, ` minimal-pba-cli-plugin- ` ).
10+ - ` [project.entry-points.minimal_pba_cli] ` : This section must exist in ` pyproject.toml ` and must contain one key-value pair,
11+ where the key is the "proper" name of the plugin (without the distribution name prefix)
12+ and the value is the dotted module path of the plugin's main entry point
13+ - The plugin entry point: This module must contain either or both of ` groups ` and ` commands ` .
14+ Each of these is a dictionary whose keys are the name of the command or command group that the plugin will provide to the core CLI,
15+ and whose values are the [ Typer] ( https://typer.tiangolo.com/ ) command group objects or command objects, respectively, to execute.
You can’t perform that action at this time.
0 commit comments