Skip to content

nexios-labs/contrib

Repository files navigation

Nexios Logo

Nexios Contrib

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


Packages

  • URL Normalization Middleware: nexios_contrib.slashes

  • Trusted Host Middleware: nexios_contrib.trusted

    • README: nexios_contrib/trusted/README.md
    • Validates the Host header against allowed hosts to prevent Host header attacks and ensure requests come from trusted domains.
  • ETag Middleware: nexios_contrib.etag

  • JSON-RPC: nexios_contrib.jrpc

More contribs will be added over time. Contributions welcome!


Installation

Install the meta package (brings in all contribs):

pip install nexios_contrib

Or install directly from a specific package as they become available on PyPI.


Quick Example (ETag)

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.


Development

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

Project Structure

./
├── nexios_contrib/
│   └── etag/                 # ETag middleware package
├── tests/
├── docs/
├── pyproject.toml
└── README.md

Each contrib package is versioned and released independently.


Releasing

  1. Update the package’s version in its pyproject.toml (SemVer).
  2. Commit and push to main.
  3. Create a release/tag.
  4. Publish to PyPI.

Built with ❤️ by @nexios-labs

About

Mono repo for nexios contrib libraries

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages