PackagePlugin

Base class for Forge package plugins.

Forge packages should provide a concrete implementation of this class and register it via the forge.packages entry point group. The plugin acts as the main interface between the foundation framework and the package, providing access to package-specific functionality.

All methods have default implementations that return None, making the plugin system highly extensible. Subclasses only need to override the methods they actually use.

Member Functions:

get_config_units

get_config_units()

Return a mapping of configurable unit names to their data model classes.

This method provides access to the main configurable units offered by the package. Configurable units are typically facade classes that provide high-level APIs for working with package-specific functionality.

The default implementation returns None. Subclasses should override this method to provide their package-specific components.

Returns

dict[str, type[ConfigUnitDataModel]] | None

get_validation_registry

get_validation_registry()

Return the optional validation rule registry for this package plugin.

Returns

Any | None

get_config_unit_registrations

get_config_unit_registrations()

Return optional configurable unit registrations for plugin-based facade construction.

Returns

dict[str, ConfigUnitFacadeRegistration[Any, Any]] | None