Extensions

class micro_framework.extensions.Extension

Bases: object

An element to be bind into the Service Runner. It also binds sub-extensions (Extension inside another)

async bind(runner, parent=None)

Binds the extension to the service runner and parent. :param Runner runner: Service Runner

async bind_new_extension(attr_name, extension, runner, parent)
context_singleton = False
parent = None
property runner
async setup()

Called After the binding and before the system start

singleton = False
async start()

Commands the extension to start running.

async stop()

Commands the extension to do a graceful stop