pointsecio.middleware.main¶
Module Contents¶
Classes¶
High level PointSecIO middleware that manages a list o middlewares wrapped around an |
- class pointsecio.middleware.main.PointSecIOMiddleware(app: starlette.types.ASGIApp, middlewares: Optional[List[Type[starlette.types.ASGIApp]]] = None)¶
High level PointSecIO middleware that manages a list o middlewares wrapped around an application.
- Parameters
app – App to wrap middleware around.
middlewares – List of middlewares to wrap around app. The list should be ordered from outer to inner middleware.
- default_middlewares¶
- add_api(self, specification: Union[pathlib.Path, str, dict], base_path: Optional[str] = None, arguments: Optional[dict] = None, **kwargs) None¶
Add an API to the underlying routing middleware based on a OpenAPI spec.
- Parameters
specification – OpenAPI spec as dict or path to file.
base_path – Base path where to add this API.
arguments – Jinja arguments to replace in the spec.
- async __call__(self, scope: starlette.types.Scope, receive: starlette.types.Receive, send: starlette.types.Send) None¶