snake._meta
#
Meta Class Voodoo magic.
Module Contents#
Classes#
A MetaClass adding registration for subclasses and transform to dataclass. |
|
A Mixin to add a logger to a class. |
|
Make Enum case insensitive. |
|
Base Class for Enum to be case insensitive. |
|
A Decorator to register methods of the same type in dictionaries. |
|
Environment Configuration. |
Functions#
Create a property logger. |
|
Recursive HTML representation for dataclasses. |
Data#
API#
- snake._meta.T = 'TypeVar(...)'#
- snake._meta.ThreeInts = None#
- snake._meta.ThreeFloats = None#
- snake._meta.make_log_property(dunder_name: str) collections.abc.Callable [source]#
Create a property logger.
- snake._meta.dataclass_repr_html(obj: Any, vertical: bool = True) str [source]#
Recursive HTML representation for dataclasses.
This function generates an HTML table representation of a dataclass, including nested dataclasses.
- Parameters:
obj (The dataclass instance.)
- Returns:
str
- Return type:
An HTML table string representing the dataclass.
- class snake._meta.MetaDCRegister[source]#
Bases:
type
A MetaClass adding registration for subclasses and transform to dataclass.
- class snake._meta.LogMixin[source]#
A Mixin to add a logger to a class.
- property log: logging.Logger#
Logger.
- class snake._meta.MethodRegister(register_name: str)[source]#
A Decorator to register methods of the same type in dictionaries.
- Parameters:
name (str) β The register
Initialization
- __call__(method_name: str | collections.abc.Callable) collections.abc.Callable [source]#
Register the function in the registry.
- class snake._meta.ENVCONFIG[source]#
Environment Configuration.
- SNAKE_TMP_DIR = '/tmp'#
- SNAKE_HDF5_CHUNK_SIZE = None#
- SNAKE_HDF5_CHUNK_WRITE_SIZE = None#
- snake._meta.EnvConfig = 'ENVCONFIG(...)'#