NitroStack Logo
/python
/api
/middleware

Middleware API

Protocol: async def use(self, context: ExecutionContext, next_fn).

Python
from nitrostack import use_middleware

@use_middleware(AuditMiddleware)
async def handler(...):
    ...

Call await next_fn() to continue the pipeline. See Middleware.