Zecure Microservices Framework (ZecMF)
A lightweight framework for building microservices in Python with Flask.
Features
- Application Factory: Streamlined Flask application initialization that wires database, Celery, auth, CORS, observability, health, security headers and the error envelope in one call.
- JWT Authentication: Default-deny auth with RS256/HS256, RBAC decorators, normalized role claims, optional audience/issuer scoping, and typed current-user accessors.
- API Setup: Flask-RESTX with a standardized JSON error envelope
(
{message, code, details, request_id}) and first-class pagination primitives. - Background Tasks: Celery integration with an app-context
ContextTaskand a two-line worker bootstrap (zecmf.worker.make_celery), plus task monitoring. - Observability: Configurable structured logging (
text/json), per-requestX-Request-IDcorrelation IDs,/healthz+/readyzprobes, and an optional Prometheus/metricsendpoint. - Security: Security response headers, optional rate limiting, and safe defaults.
- Database: SQLAlchemy 2.0 + Alembic integration and migration scaffolding.
- Typed + Testable: Ships
py.typed, and a reusablezecmf.testing.pluginpytest plugin (app/client/db/token fixtures). - Configuration: Hierarchical config with framework defaults and app overrides.
Installation
pip install zecmf # core (web APIs, auth, DB)
pip install "zecmf[celery]" # + background tasks
pip install "zecmf[clients]" # + LLM/HTTP clients
pip install "zecmf[celery,clients]" # 0.1-equivalent superset
# optional: zecmf[ratelimit], zecmf[metrics]
Debugging
If you want to include the code in your application for debugging purposes, you can simply mount it:
volumes:
- ${HOME}/Repos/Zecure/zecmf/src/zecmf:/home/appuser/.local/lib/python3.12/site-packages/zecmf:ro
Metadata
Release files for zecmf 0.2.1
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 | Actions |
|---|---|---|---|---|
| zecmf-0.2.1.tar.gz | 114.4 kB | With provenance | Details for zecmf-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| zecmf-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for zecmf-0.2.1-py3-none-any.whl |
Total release size: 191.9 kB
Release files / zecmf-0.2.1.tar.gz
| Download URL | zecmf-0.2.1.tar.gz |
|---|---|
| Size | 114.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1d4a6ba43a07e2faf44298bf1ca3a50fd5c8fb28d5e2a822d4a8c098464ae08
|
|
BLAKE2b-256 checksum How to use checksums |
8805d8e405909ab687d8f83f56e93ed40b796376e7304d014684a0a1429ccaa1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 13, 2026.
Transparency logRelease files / zecmf-0.2.1-py3-none-any.whl
| Download URL | zecmf-0.2.1-py3-none-any.whl |
|---|---|
| Size | 77.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b3d2246851a7a3da522602f8fb743b4cc74458131210d0ced16eaab52deae28c
|
|
BLAKE2b-256 checksum How to use checksums |
2035ca244d10dc0d52e450ad77fe743565c7acb6cd48506cd1329d862963d5fc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 13, 2026.
Transparency logSecurity for zecmf 0.2.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for zecmf-0.2.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 13, 2026.
Transparency logA 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.