demessaging.config.registry module
API registry class for demessaging.
Classes:
|
A registry for imports and encoders |
- class demessaging.config.registry.ApiRegistry(*, imports: ~typing.Dict[str, str] = <factory>, objects: ~typing.List[str] = <factory>)[source]
Bases:
BaseModelA registry for imports and encoders
- Parameters:
Methods:
can_import_import(imports)hard_code(python_code)Register some code to be implemented in the generated module.
register_import(module[, alias])Register a module that needs to be imported in generated API files.
register_type(obj)Register a class or function to be available in the generated API.
Attributes:
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- hard_code(python_code: str) None[source]
Register some code to be implemented in the generated module.
- Parameters:
python_code (str) – The code that is supposed to be executed on a module level.
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].