mworks
The goal of this project is to remove some boilerplate and add few standard routes to flask applications.
Usage
Add common routes to the flask application:
from mworks import CommonRoutes
from flask import Flask
app = Flask(__name__)
mworks = CommonRoutes(app)
You can optionally add authorisation for sensitive endpoints:
is_admin = lambda: request.remote_addr == '127.0.0.1'
mworks = CommonRoutes(app, auth_checks=[is_admin])
Features
CommonRoutes has the following endpoints implemented:
/healthz- Always returns HTTP 200, useful for healthchecks/varz- Get variables for service monitoring. Customizable./docz- Read README.md from the application and render it./logz- Render logs from the application in the browser.
Metadata
Release files for mworks 2.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mworks-2.0.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Release files / mworks-2.0.0-py2.py3-none-any.whl
| Download URL | mworks-2.0.0-py2.py3-none-any.whl |
|---|---|
| Size | 3.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
eb92e3ff43c68ab192ad6005fa197d7b3c98335460fa16046c94a12eb1608202
|
|
BLAKE2b-256 checksum How to use checksums |
ad5d13a15d81688ff189e3c9162a10d3ff365d53bb476ac9f10d4e182d3b4272
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.15.0 pkginfo/1.6.1 requests/2.25.0 setuptools/44.1.1 requests-toolbelt/0.9.1 tqdm/4.53.0 CPython/2.7.17
|