Method Models And Signatures#

Global variable for models#

fitrequest.method_models.environment_models = {}#

Global dictionnary used to map json/yaml declared models to actual python models.

Hint

Don’t forget to update this dictionnary with custom models when using them in yaml/json files.

Models signatures#

pydantic model fitrequest.method_models.AttrSignature[source]#

Bases: BaseModel

Represents the signature of the attribute.

Fields:
field alias: str | None = None#
field annotation: str [Required]#
field attr_type: Literal['arg', 'kwarg'] [Required]#
field default_value: str | None = None#
field name: str [Required]#
pydantic model fitrequest.method_models.FlattenedModelSignature[source]#

Bases: BaseModel

Represents flattened model signatures, simplifying nested Pydantic models into straightforward method signatures.

This class flattens model structures to create simple signatures that are easy to handle with command-line tools. However, it has limitations: it does not support complex signatures involving unions (Model | dict | None) or lists (list[Model]).

Fields:
field model: type[BaseModel] [Required]#