types¶
Type aliases and constants used in the package config.
- class advanced_alchemy.config.types.Any[source]¶
Bases:
object
Special type indicating an unconstrained type.
Any is compatible with every type.
Any assumed to have all methods.
All values assumed to be instances of Any.
Note that all the above statements are true from the point of view of static type checkers. At runtime, Any should not be used with instance checks.
- advanced_alchemy.config.types.TypeEncodersMap: TypeAlias = 'Mapping[Any, Callable[[Any], Any]]'¶
Type alias for a mapping of type encoders.
Maps types to their encoder functions.
- advanced_alchemy.config.types.TypeDecodersSequence: TypeAlias = 'Sequence[Tuple[Callable[[Any], bool], Callable[[Any, Any], Any]]]'¶
Type alias for a sequence of type decoders.
Each tuple contains a type check predicate and its corresponding decoder function.