Entrypoints Module API Reference¶
This section documents the internals of the entrypoints
module in Bijux CLI.
bijux_cli.services.plugins.entrypoints ¶
Discovers and loads plugins distributed as Python packages.
This module provides the load_entrypoints
function, which is responsible for finding and loading plugins that have been installed into the Python environment and registered under the bijux_cli.plugins
entry point group. This enables a distributable plugin ecosystem where plugins can be managed via tools like pip
.
load_entrypoints async
¶
load_entrypoints(
di: DIContainer | None = None,
registry: RegistryProtocol | None = None,
) -> None
Discovers, loads, and registers all entry point-based plugins.
This function iterates through all entry points in the 'bijux_cli.plugins' group. For each one, it attempts to load, instantiate, and register the plugin. It also performs an API version compatibility check and runs the plugin's startup
hook if present.
Note
All exceptions during the loading or startup of a single plugin are caught, logged, and reported via telemetry. A failed plugin will be deregistered and will not prevent other plugins from loading.
Parameters:
-
di
(DIContainer | None
, default:None
) –The dependency injection container. If None, the current global container is used.
-
registry
(RegistryProtocol | None
, default:None
) –The plugin registry. If None, it is resolved from the DI container.
Returns:
-
None
(None
) –