class documentation

Base class for enum types

This implementation is used over Python's builtin solutions to permit interface with the Converter system.

Class Method get Converts bytes -> int, returning the first byte
Class Method get_name Finds the first name in this enum with a given value
Class Method set Converts int -> bytes, enforcing that the input is a recognized enum value
Class Variable _all Undocumented
@classmethod
def get(cls, data: bytes, **kwargs) -> _T: (source)

Converts bytes -> int, returning the first byte

Parameters
data:bytesThe raw bytes to convert
**kwargsUndocumented
Returns
_TThe first byte of data
@classmethod
def get_name(cls, value: _T) -> str: (source)

Finds the first name in this enum with a given value

Parameters
value:_TThe value to find
Returns
strA name in this enum with value value or None
@classmethod
def set(cls, value: _T, **kwargs) -> bytes: (source)

Converts int -> bytes, enforcing that the input is a recognized enum value

Parameters
value:_TThe value to convert
**kwargsUndocumented
Returns
bytesThe byte in value, unchanged