Skip to main content

ASGI Web Framework with Dependency Injection

Project description

Project Selva

Documentation: https://livioribeiro.github.io/selva/

Selva is a Python ASGI web framework built on top of asgikit and inspired by Spring Boot, AspNet, FastAPI and Go's net/http.

It features a Dependency Injection system to help build robust and reliable applications.

Quick start

Install selva and uvicorn to run application:

pip install selva uvicorn[standard]

Create a module called application.py:

touch application.py

Create a controller:

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):

uvicorn selva.run:app --reload

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

selva-0.16.0.tar.gz (28.2 kB view details)

Uploaded Source

Built Distribution

selva-0.16.0-py3-none-any.whl (44.2 kB view details)

Uploaded Python 3

File details

Details for the file selva-0.16.0.tar.gz.

File metadata

  • Download URL: selva-0.16.0.tar.gz
  • Upload date:
  • Size: 28.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for selva-0.16.0.tar.gz
Algorithm Hash digest
SHA256 a871d65db02a4753d9fb64359600b27888ddd201eb29263015be0c7557d3507c
MD5 fdc715c5cc1eee3d87ce56fe6d150183
BLAKE2b-256 a0a14f35ff07865b7636a281db4eff12ed08f427e75766b404c40626fb46416d

See more details on using hashes here.

File details

Details for the file selva-0.16.0-py3-none-any.whl.

File metadata

  • Download URL: selva-0.16.0-py3-none-any.whl
  • Upload date:
  • Size: 44.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for selva-0.16.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6401495f9f689c3af3533a50674ac0458efbdcad01b925178f3c813e0d70491f
MD5 af4a25efb1e87b9e31868900e0cdb0c0
BLAKE2b-256 2d64e7fd3183b98a9154bf3a77d9324da40e0d05162ec9a4f9dbce46fdb1f468

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page