A common utility framework for web microservices
The goal of this project is to remove some boilerplate and add few standard routes to flask applications.
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])
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.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size mworks-1.0.5-py3-none-any.whl (4.1 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size mworks-1.0.5.tar.gz (3.2 kB)||File type Source||Python version None||Upload date||Hashes View|