vcorelib.schemas package#
Submodules#
vcorelib.schemas.base module#
A module defining interfaces for schema enforcement.
- class vcorelib.schemas.base.Schema(data: Dict[str, str | int | float | bool | None | Dict[str, str | int | float | bool | None] | List[str | int | float | bool | None]], **_)[source]#
Bases:
ABC
A base class for schema enforcement.
- class vcorelib.schemas.base.SchemaMap[source]#
Bases:
UserDict
,MutableMapping
[str
,Schema
]A class for managing multiple schema objects.
- classmethod from_package(package: str, includes_key: str = None, **kwargs) V [source]#
Create a new JSON-schema map from package data.
- abstract classmethod kind() Type[Schema] [source]#
Implement this to determine the concrete schema type.
- load_directory(path: Path | str | None, includes_key: str = None, **kwargs) Iterator[Tuple[str, Schema]] [source]#
Load a directory of schema files into the map.
vcorelib.schemas.json module#
A module for interacting with JSON schemas.
- class vcorelib.schemas.json.JsonSchema(data: Dict[str, str | int | float | bool | None | Dict[str, str | int | float | bool | None] | List[str | int | float | bool | None]], **_)[source]#
Bases:
Schema
An object wrapper for: https://horejsek.github.io/python-fastjsonschema/.
See also: https://json-schema.org/.
vcorelib.schemas.mixins module#
A module for implementing schema-validated classes.
Module contents#
A module for working with various schema enforcement implementations.
- class vcorelib.schemas.CerberusSchema(data: Dict[str, str | int | float | bool | None | Dict[str, str | int | float | bool | None] | List[str | int | float | bool | None]], **kwargs)[source]#
Bases:
Schema
An object wrapper for: https://docs.python-cerberus.org/en/stable/.