API Reference

Class Summary

ApiConfigurationSchema

ApiConfigurationSchema is a configuration schema root for API configuration. Use this class for individual configuration schemas that will be exported as JSON with a $schema property. Inherits from: ConfigurationSchema: The base configuration schema root class. This class currently does not add any additional fields or methods.

ConfigModel

Base configuration for all data models. This abstract base class provides standardized validation and serialization behavior for all data models in the system. It configures Pydantic models to: - Validate field assignments - Prevent implicit type conversions - Ignore extra fields in input data for forward compatibility All domain data models should inherit from this class to ensure consistent behavior across the application.

ConfigUnitDataModel

ConfigUnitDataModel is the base class for defining configuration data models for individual configurable units. A configurable unit data model organizes configuration into API, Implementation, and Runtime sections using direct schema-typed fields on the configurable unit model itself. The configuration sections are defined as fields on the ConfigUnitDataModel subclass. Only include the sections relevant to your configurable unit (a configurable unit can have 1 to 3 sections). Example with all three configuration sections: class MyConfigUnitDataModel(ConfigUnitDataModel): api: MyApiConfigurationSchema implementation: MyImplementationConfigurationSchema runtime: MyRuntimeConfigurationSchema Example with multiple runtime schemas on the configurable unit: class MyConfigUnitDataModel(ConfigUnitDataModel): runtime_machine_config: MachineConfig runtime_process_configs: list[ProcessConfig] Inherits from: ConfigModel: The base configuration model class.

ConfigUnitFacade

Base class for facade classes managing one ConfigUnitDataModel instance. A ConfigUnitFacade is a special facade class that manages the whole configuration data of a configurable unit represented by a ConfigUnitDataModel instance. All configurable unit facades in the system inherit from this class. Export goes through fsp_config_foundation.export_tool.ExportTool. Inherits from: Facade: The base facade class.

ConfigUnitFacadeRegistration

Registration container pairing a configurable unit data model with its facade and factories. Package plugins can expose registrations via PackagePlugin.get_config_unit_registrations() to allow lookup by configurable unit data model type.

ConfigurationSchema

ConfigurationSchema is the root class of one configuration definition. A configuration file carries $schema, $definition, and $definitionVersion in front of its data. $schema is kept on the instance as schema_ref so that a re-exported file references the same schema it was read from; the other two are derived from the class when exporting. Inherits from: ConfigModel: The base configuration model class.

Entity

Base class for identifiable configuration objects. An entity whose generated class marks a field with NameSource may leave name out of its input: it is then synthesized from that field, the way Confugami’s parser does it, and left out again on export. A synthesized name follows its field: assigning the field re-synthesizes it, as editing the value renames the entity in Confugami. A written name never follows, even when it happens to equal the synthesized one. References to the old name are not rewritten; RefResolver.validate() reports them as not found.

EntityCollection

Name-addressed view on one entity collection of a facade. This is the read-and-remove counterpart of ensure_entity_name_available, for the collections a facade exposes through its add_ / get_ / remove_ / has_ method set. The collection keeps a reference to the list it was given rather than a copy, so remove mutates the caller’s list. Constructing one per call site is intended: def get_runtime_context(self, name: str) → RuntimeContextFacade: context = EntityCollection(self._runtime.contexts, "Runtime context").get(name) return RuntimeContextFacade(context.name, context)

ExportTool

The export entry point: writes configurable units as folders and single configurations as files. Every export checks the model before it writes a file. If the check fails, nothing is written and one fsp_config_foundation.error.ValidationError lists every finding. The check covers the constraints of each configuration and its references; it does not run fsp_config_foundation.validation.ValidationTool or domain validation rules.

Facade

Facade is a base class for all facade classes. A facade manages one or multiple configuration data trees.

ImplementationConfigurationSchema

ImplementationConfigurationSchema is a configuration schema root for implementation configuration. Use this class for individual configuration schemas that will be exported as JSON with a $schema property. Inherits from: ConfigurationSchema: The base configuration schema root class. This class currently does not add any additional fields or methods.

ImportTool

Reads Confugami-compatible .cfg.json files: a folder into a configurable unit facade, a file into one configuration.

NamedInstance

Mixin class for named instances. This class provides a name attribute and a method to retrieve the name.

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.

Ref

Typed reference to an Entity represented as a path string in JSON.

RefOutcome

Structured result of resolving a reference within a schema.

RefResolver

Resolve references against one configuration or a whole configurable unit. The entity index and the list of references are read from the scope once, when the resolver is built, so keep one resolver for a series of lookups, and build a new one after the scope changes.

RefStatus

Outcome category for resolving a reference.

RuntimeConfigurationSchema

RuntimeConfigurationSchema is a configuration schema root for runtime configuration. Use this class for individual configuration schemas that will be exported as JSON with a $schema property. Inherits from: ConfigurationSchema: The base configuration schema root class. This class currently does not add any additional fields or methods.

Struct

Base class for plain nested data structures that are not referenceable by Ref[T].

ValidationError

Validation failure with a unified structured error API.

ValidationTool

Automatic validation tooling that discovers rules via plugins.

This reference is generated from fsp-config-foundation 0.11.0.