geolib.models.serializers¶
Classes
|
Basic class for serializers. |
- class geolib.models.serializers.BaseSerializer(**data)¶
Basic class for serializers.
- Parameters:
data (
Any
)
-
ds:
Dict
[str
,Any
]¶
- model_computed_fields: ClassVar[dict[str, ComputedFieldInfo]] = {}¶
A dictionary of computed field names and their corresponding ComputedFieldInfo objects.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'forbid', 'validate_assignment': True, 'validate_default': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_fields: ClassVar[dict[str, FieldInfo]] = {'ds': FieldInfo(annotation=Dict[str, Any], required=True)}¶
Metadata about the fields defined on the model, mapping of field names to [FieldInfo][pydantic.fields.FieldInfo].
This replaces Model.__fields__ from Pydantic V1.
- render()¶
- Return type:
str
- write(filename)¶
Write serialized model to Filepath or BytesIO buffer
- Parameters:
filename (
Union
[Path
,BinaryIO
])