mafw.models
Model helpers shared across MAFw.
- class mafw.models.FilterSchema(root_model: type[~mafw.db.db_model.MAFwBaseModel], allowed_models: tuple[type[~mafw.db.db_model.MAFwBaseModel], ...] = <factory>)[source]
Bases:
objectStatic descriptor of the models available to the GUI filter builder.
- Parameters:
root_model – Model that controls the primary query entry point.
allowed_models – Supplementary models that can be joined during filtering.
- class mafw.models.ParameterSchema(name: str, annotation: type | None, default: Any, help: str | None, is_list: bool, is_dict: bool)[source]
Bases:
objectStatic metadata describing a single processor parameter.
- Parameters:
name – Symbolic name used in steering files.
annotation – Optional type hint supplied by the processor definition.
default – The default value declared on the descriptor.
help – Documentation text that should be surfaced to the user.
is_list – True if the parameter expects a
list-like value.is_dict – True if the parameter expects a
dict-like value.
- class mafw.models.ProcessorSchema(parameters: List[ParameterSchema], filter: FilterSchema | None)[source]
Bases:
objectStatic metadata describing a processor.
- Parameters:
parameters – List of parameter schemas.
filter – Optional filter schema.
- get_parameter(parameter_name: str) ParameterSchema[source]
Return the parameter schema for the given parameter name.
Modules
Static metadata describing the models available for filtering. |
|
Schemas describing processor parameters. |
|
Schemas describing a processor. |