takumi-ext
Simple extension system for extending Takumi framework.
Install
$ pip install takumi-ext
Example
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())
app.run()
To implement this extension:
# package name runner_ext
class RunnerExt(ExtBase):
name = 'app-runner'
def __init__(self, app):
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:
extensions:
- runner_ext
Metadata
Release files for takumi-ext 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| takumi_ext-0.1.2.tar.gz | 2.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| takumi_ext-0.1.2-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 6.6 kB
Release files / takumi_ext-0.1.2.tar.gz
| Download URL | takumi_ext-0.1.2.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2975603fd3a87cf9a70d593ef9a94fe05bf93b6822720c5adcf88f4da9c0c1f9
|
|
BLAKE2b-256 checksum How to use checksums |
3b3e94fdb21d4e238e7de024173398bc21e077777cbb17ccc4a7c76132f51bd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / takumi_ext-0.1.2-py2.py3-none-any.whl
| Download URL | takumi_ext-0.1.2-py2.py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
8e758eb1b179571bbf5d8d9633447960c659fd0dfe938ea47398ae2f9f588064
|
|
BLAKE2b-256 checksum How to use checksums |
c8072dc44f86ad4f64fe8e5abec6142e70cd52d37ad8f9b8afb102272d596c0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for takumi-ext 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.