A common utility framework for web microservices
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file mworks-2.0.0-py2.py3-none-any.whl
.
File metadata
- Download URL: mworks-2.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 2, Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb92e3ff43c68ab192ad6005fa197d7b3c98335460fa16046c94a12eb1608202 |
|
MD5 | 1bf8a82a7a38403116247cb38ee533a3 |
|
BLAKE2b-256 | ad5d13a15d81688ff189e3c9162a10d3ff365d53bb476ac9f10d4e182d3b4272 |