Loader
Load a Click command object from a file system path.
| CLASS | DESCRIPTION |
|---|---|
LoadError |
Raised when a Click command cannot be loaded. |
| FUNCTION | DESCRIPTION |
|---|---|
load_command |
Load a Click command from a Python file. |
Classes
LoadError
Bases: Exception
Raised when a Click command cannot be loaded.
Functions
load_command
Load a Click command from a Python file.
| PARAMETER | DESCRIPTION |
|---|---|
module_path
|
File system path to the Python module (absolute or relative to cwd).
TYPE:
|
command_name
|
Dotted attribute path on the module, e.g.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
BaseCommand
|
The resolved Click command object. |
| RAISES | DESCRIPTION |
|---|---|
LoadError
|
If the file does not exist, the attribute is missing, or the resolved object is not a Click command. |