betty.core module

Provide tools to build core application components.

class betty.core.CoreComponent[source]

Bases: ABC

A core component.

Core components can manage their resources by being bootstrapped and shut down.

This is internal. It MAY be used anywhere in Betty’s source code, but MUST NOT be used by third-party code.

Parameters:
__init__(*args: Any, **kwargs: Any)[source]
Parameters:
async bootstrap() None[source]

Bootstrap the component.

Return type:

None

async shutdown() None[source]

Shut the component down.

Return type:

None