httk.core.plugins¶
Re-export the httk plugin APIs.
Submodules¶
Attributes¶
Classes¶
Describe one installed plugin and its installer metadata. |
|
Describe a validated plugin manifest. |
|
Describe one declared plugin program. |
Functions¶
|
Build and publish the declared programs of an installed plugin. |
|
Install one plugin from an existing local directory. |
|
Remove an installed plugin and its still-owned shims. |
Read all valid installed plugins. |
|
|
Return the absolute path of an installed plugin program. |
|
Return the root of an installed plugin. |
Return the installed plugin directory. |
|
Return the plugin shim directory. |
|
|
Parse and validate one plugin manifest. |
Package Contents¶
- httk.core.plugins.build_plugin(name)[source]¶
Build and publish the declared programs of an installed plugin.
- httk.core.plugins.install_plugin(source, *, force=False)[source]¶
Install one plugin from an existing local directory.
source_sha256is pre-build provenance: build output and the build log may change the installed tree after this digest is recorded.- Parameters:
source (str | pathlib.Path) – Supply the local plugin directory.
force (bool) – Replace an installed plugin with the same name.
- Returns:
The installed plugin.
- Raises:
ValueError – If the source or plugin is invalid or cannot be built.
- Return type:
- httk.core.plugins.uninstall_plugin(name)[source]¶
Remove an installed plugin and its still-owned shims.
- class httk.core.plugins.InstalledPlugin[source]¶
Describe one installed plugin and its installer metadata.
- Parameters:
name – Name the installed plugin directory.
root – Locate the installed plugin directory.
manifest – Provide the parsed plugin.json object.
metadata – Provide the parsed plugin.json object.
- root: pathlib.Path¶
- metadata: collections.abc.Mapping[str, object]¶
- httk.core.plugins.installed_plugins()[source]¶
Read all valid installed plugins.
- Returns:
Valid installed plugins in directory-name order.
- Return type:
tuple[InstalledPlugin, Ellipsis]
- httk.core.plugins.plugin_program(name, program)[source]¶
Return the absolute path of an installed plugin program.
- Parameters:
- Returns:
The program’s absolute path.
- Raises:
ValueError – If the plugin or program is unavailable.
- Return type:
- httk.core.plugins.plugin_root(name)[source]¶
Return the root of an installed plugin.
- Parameters:
name (str) – Name the installed plugin directory.
- Returns:
The installed plugin directory.
- Raises:
ValueError – If the plugin is not installed.
- Return type:
- httk.core.plugins.plugins_home()[source]¶
Return the installed plugin directory.
- Returns:
The plugin data directory.
- Return type:
- httk.core.plugins.shims_home()[source]¶
Return the plugin shim directory.
- Returns:
The shim data directory.
- Return type:
- class httk.core.plugins.PluginManifest[source]¶
Describe a validated plugin manifest.
- Parameters:
name – Name the plugin.
description – Describe the plugin, when supplied.
templates – Name project-template directories.
workflows – Name workflow-package directories.
programs – Describe declared utility programs.
build – Describe the optional build.
root – Locate the parsed plugin directory.
- programs: tuple[PluginProgram, Ellipsis]¶
- build: httk.core.building.BuildSpec | None¶
- root: pathlib.Path¶
- class httk.core.plugins.PluginProgram[source]¶
Describe one declared plugin program.
- Parameters:
name – Name the program and its shim.
file – Name the program member relative to the plugin root.
description – Describe the program, when supplied.
- httk.core.plugins.parse_plugin_manifest(directory)[source]¶
Parse and validate one plugin manifest.
- Parameters:
directory (pathlib.Path) – Locate the plugin directory.
- Returns:
The validated plugin manifest.
- Raises:
ValueError – If the plugin directory or manifest is malformed.
- Return type: