betty.core module¶
Provide tools to build core application components.
- class betty.core.Bootstrapped[source]¶
Bases:
objectA component that can be in a bootstrapped state.
This is internal. It MAY be used anywhere in Betty’s source code, but MUST NOT be used by third-party code.
- class betty.core.CoreComponent[source]¶
Bases:
Bootstrapped,Shutdownable,ABCA 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.
- class betty.core.ShutdownCallbackKwargs[source]¶
Bases:
TypedDictThe keyword arguments to a shutdown callback.
- final class betty.core.ShutdownStack[source]¶
Bases:
Bootstrapped,ShutdownableA stack that invokes callbacks in reverse order upon shutting down.
This is internal. It MAY be used anywhere in Betty’s source code, but MUST NOT be used by third-party code.
- append(callback: Callable[[Unpack[ShutdownCallbackKwargs]], Awaitable[None]] | Shutdownable) None[source]¶
Append a callback or another component to the stack.