Method Models And Signatures#
Global variable for models#
- fitrequest.method_models.environment_models = {}#
Global dictionnary used to map
json/yamldeclared models to actual python models.Hint
Don’t forget to update this dictionnary with custom models when using them in
yaml/jsonfiles.
Models signatures#
- pydantic model fitrequest.method_models.AttrSignature[source]#
Bases:
BaseModelRepresents 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:
BaseModelRepresents 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]).- field model: type[BaseModel] [Required]#