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.14.0.tar.gz (27.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

selva-0.14.0-py3-none-any.whl (43.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: selva-0.14.0.tar.gz
  • Upload date:
  • Size: 27.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for selva-0.14.0.tar.gz
Algorithm Hash digest
SHA256 4e6dade8942eb74174ef1dc8b1ab9c6da7afb742455d6f732b0e1f4f7efe5a9d
MD5 458782b2b196ceb1f04cd019b52e7f94
BLAKE2b-256 cab7b746adb5ed6edd9275c6e923411ae3c6052a04fcd103875baab75eac8050

See more details on using hashes here.

File details

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

File metadata

  • Download URL: selva-0.14.0-py3-none-any.whl
  • Upload date:
  • Size: 43.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for selva-0.14.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9ce6f90a59d36de4903b6e7c06eddc3e6d6f22d964f26706c14551a8fcd3eb03
MD5 0d1308529cb361584982214279c4b775
BLAKE2b-256 7dc57bc01207fc8ce7ac576780ffed6e2ed41d1517b32934b84dfd5227fae6e0

See more details on using hashes here.

Supported by

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