Community-driven extensions and add‑ons for the Nexios ASGI framework. This repository hosts independently versioned packages that you can install a‑la‑carte or together via the meta package.
📖 View Documentation | 🚀 Get Started
-
URL Normalization Middleware:
nexios_contrib.slashes- README: nexios_contrib/slashes/README.md
- Handles trailing slashes, double slashes, and URL normalization for consistent, clean URLs.
-
Trusted Host Middleware:
nexios_contrib.trusted- README: nexios_contrib/trusted/README.md
- Validates the
Hostheader against allowed hosts to prevent Host header attacks and ensure requests come from trusted domains.
-
ETag Middleware:
nexios_contrib.etag- README: nexios_contrib/etag/README.md
- Provides automatic
ETaggeneration and conditional request handling (If-None-Match→304).
-
JSON-RPC:
nexios_contrib.jrpc- README: nexios_contrib/jrpc/README.md
- JSON-RPC 2.0 server and client implementation for building RPC APIs.
More contribs will be added over time. Contributions welcome!
Install the meta package (brings in all contribs):
pip install nexios_contribOr install directly from a specific package as they become available on PyPI.
from nexios import NexiosApp
import nexios_contrib.etag as etag
app = NexiosApp()
app.add_middleware(etag.ETag())
@app.get("/")
async def home(request, response):
return {"message": "Hello with ETag!"}See the full guide in the ETag README.
This repo uses uv workspaces and hatchling for builds.
Common tasks:
# Sync workspace deps
uv sync
# Run tests
pytest -q
# Build wheel/sdist
python -m build./
├── nexios_contrib/
│ └── etag/ # ETag middleware package
├── tests/
├── docs/
├── pyproject.toml
└── README.md
Each contrib package is versioned and released independently.
- Update the package’s version in its
pyproject.toml(SemVer). - Commit and push to
main. - Create a release/tag.
- Publish to PyPI.
Built with ❤️ by @nexios-labs