partis.schema.prim.map_prim module#
- class MapPrimDeclared(name=None, module=None, module_set=None, doc=None, **kwargs)[source]#
Bases:
SchemaPrimDeclared
- class MapPrim(name=None, module=None, module_set=None, doc=None, **kwargs)[source]#
Bases:
SchemaPrimPrimitive for dictionary/mapping values
- Parameters:
item¶ (
SchemaPrim|SchemaPrim) – The schema for the value of each item in the mapping**kwargs¶ (arguments passed to
SchemaPrim) –
- property hints#
Definition hints.
- Type:
list[
SchemaHint]
- encode(val=None, loc=None, no_defaults=None)[source]#
Encodes value to basic Python types, performing validation
- Parameters:
- Returns:
val (object)
- Raises:
SchemaValidationError – If the value is not valid