Skip to main content

Simple extension system for extending Takumi framework

Project description

Simple extension system for extending Takumi framework.


$ pip install takumi-ext


Here is an extension for running codes before app starts and after app exists.

app = AppRunner()
app_runner_ext = ext['app-runner']

if app_runner_ext:
    runner_ext = app_runner_ext(app)
    app.cfg.set('when_ready', lambda x: runner_ext.on_start())
    app.cfg.set('on_exit', lambda x: runner_ext.on_exit())

To implement this extension:

# package name runner_ext
class RunnerExt(ExtBase):
    name = 'app-runner'

    def __init__(self, app): = app

    def on_start(self):
        print('app starting...')

    def on_exit(self):
        print('app existing...')

Add the following config to app.yml to use the extension:

    - runner_ext

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for takumi-ext, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size takumi_ext-0.1.2-py2.py3-none-any.whl (4.2 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size takumi_ext-0.1.2.tar.gz (2.5 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page