Skip to main content

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)

Table of built distributions (wheels) for mworks 2.0.0
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

2.0.0 This release

1 release file

1.0.5

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page