runtimepy.codec.system package#
Module contents#
A basic type-system implementation.
- class runtimepy.codec.system.TypeSystem(*namespace: str)[source]#
Bases:
LoggerMixinA class for managing a custom type system.
- add(custom_type: str, field_name: str, field_type: str, array_length: int = None, exact: bool = True) None[source]#
Add a field to a custom type.
- enum(name: str, items: dict[str, int], *namespace: str, primitive: str = 'uint8') None[source]#
Register an enumeration.
- get_enum(name: str, *namespace: str, exact: bool = True) RuntimeEnum[source]#
Lookup an enum type at runtime.
- get_protocol(name: str, *namespace: str, exact: bool = True) Protocol[source]#
Get a custom protocol by name.
- runtime_int_enum(enum: type[RuntimeIntEnum]) None[source]#
Register an enumeration class.