stouputils.typing package#
This module provides utilities for typing enhancements:
JsonMap,JsonMutMap- Read-only and mutable mapping aliases for JSON dataIterAny,CallableAny- Type aliases for iterables and callablesClassInfo- Type alias for whatisinstanceacceptsis_generic_instance()- Runtime equivalent of isinstance() for generic type hints likedict[str, int]is_sequence()- Check if an object supports O(1)__len__and__getitem__convert_to_serializable()- Recursively convert objects (dataclasses, defaultdicts, …) to JSON-serializable forms@inheritable- Mark a class as meant to be subclassed@overridable- Mark a member as a default implementation that subclasses may replace@hook- Mark a method as a hook the base class calls at a fixed point of its flow