Selva
Selva is a tool for creating ASGI applications that are easy to build and maintain.
It is built on top of asgikit and comes with a dependency injection system built upon Python type annotations. It is compatible with python 3.11+.
Quickstart
Install selva
and uvicorn
:
Create file application.py
:
from asgikit.requests import Request
from asgikit.responses import respond_text
from selva.web import controller, get
@controller
class Controller:
@get
async def hello(self, request: Request):
await respond_text(request.response, "Hello, World")
Run application with uvicorn
. Selva will automatically load application.py
: