aio_microservice.core.abc

Attributes

Classes

CommonABC

Helper class that provides a standard way to create an ABC using

ServiceABC

Helper class that provides a standard way to create an ABC using

ExtensionABC

Helper class that provides a standard way to create an ABC using

startup_hook

shutdown_hook

lifespan_hook

readiness_probe

liveness_probe

startup_message

litestar_on_app_init

Module Contents

class aio_microservice.core.abc.CommonABC[source]

Bases: abc.ABC

Helper class that provides a standard way to create an ABC using inheritance.

__version__: ClassVar[str] = '1.0.0'
__description__: ClassVar[str] = ''
class aio_microservice.core.abc.ServiceABC(settings)[source]

Bases: CommonABC

Helper class that provides a standard way to create an ABC using inheritance.

Parameters:

settings (pydantic.BaseModel)

abstract run()[source]
Async:

Return type:

None

class aio_microservice.core.abc.ExtensionABC[source]

Bases: CommonABC

Helper class that provides a standard way to create an ABC using inheritance.

classmethod __init_subclass__()[source]
Return type:

None

aio_microservice.core.abc.CommonABCT
class aio_microservice.core.abc.startup_hook(fn)[source]
Parameters:

fn (Callable[[CommonABCT], collections.abc.Awaitable[None]])

async __call__(service)[source]
Parameters:

service (CommonABCT)

Return type:

None

class aio_microservice.core.abc.shutdown_hook(fn)[source]
Parameters:

fn (Callable[[CommonABCT], collections.abc.Awaitable[None]])

async __call__(service)[source]
Parameters:

service (CommonABCT)

Return type:

None

class aio_microservice.core.abc.lifespan_hook(fn)[source]
Parameters:

fn (Callable[[CommonABCT], collections.abc.AsyncGenerator[None, None]])

class aio_microservice.core.abc.readiness_probe(fn)[source]
Parameters:

fn (Callable[[CommonABCT], collections.abc.Awaitable[bool]])

async __call__(service)[source]
Parameters:

service (CommonABCT)

Return type:

bool

class aio_microservice.core.abc.liveness_probe(fn)[source]
Parameters:

fn (Callable[[CommonABCT], collections.abc.Awaitable[bool]])

async __call__(service)[source]
Parameters:

service (CommonABCT)

Return type:

bool

class aio_microservice.core.abc.startup_message(fn)[source]
Parameters:

fn (Callable[[CommonABCT], collections.abc.Awaitable[str]])

async __call__(service)[source]
Parameters:

service (CommonABCT)

Return type:

str

class aio_microservice.core.abc.litestar_on_app_init(fn)[source]
Parameters:

fn (Callable[[CommonABCT, litestar.config.app.AppConfig], litestar.config.app.AppConfig])

__call__(service, app_config)[source]
Parameters:
  • service (CommonABCT)

  • app_config (litestar.config.app.AppConfig)

Return type:

litestar.config.app.AppConfig