/wags

Web Framework

Primary LanguagePythonMIT LicenseMIT

Wags

Build Status Build Status

Web Framework

Example app.py:

from wags.responses import Response
from wags.routing import Handle, Route, Routing
from wags.applications import Wags

async def handle_func(request):
    return Response(content='Hello, world!', content_type='text/plain')

app = Wags(
    Routing([
        Route('/', Handle(
            handle_func
        ))
    ])
)

To start server and go to http://localhost:8000:

uvicorn app:app --host 0.0.0.0 --port 8000 --debug