Skip to main content

Yet another ASGI toolkit

Project description

Yaat

yet another ASGI toolkit

travis status docs status codecov report pypi package version Code style: black

Yaat

Yaat is an asynchronous web framework/toolkit.

Features

  • Provide decorator routes & class-based views.
  • Template support with Jinja2.
  • Static file serving.
  • HTTP streaming response.
  • Cookie support.
  • WebSocket support.
  • API schema generator and Swagger UI.
  • Background tasks runner.
  • Server startup and shutdown events.
  • CORS support.
  • Test client using httpx.

Requirements

Python 3.6+

Setup

pip3 install yaat

You'll also want to install an ASGI server, such as uvicorn.

pip3 install uvicorn

Example

Writing with Yaat is as simple as...

app.py

from yaat import Yaat
from yaat.responses import TextResponse

app = Yaat()

@app.route("/")
async def index(request):
    return TextResponse("Hello World")

Then run using uvicorn:

uvicorn app:app

Inspiration

I know there are a lot of awesome frameworks out there. So some might ask why did I write my own. Actually, I created this to learn how the web framework works.

I started this after following Jahongir Rahmonov's blog post about writing a web framework. Feel free to check out his WSGI framework Alcazar.

More features will be added in the future. You can check out the project board.

Icon Credit

Icons made by Dave Gandy from www.flaticon.com

Project details


Download files

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

Files for yaat, version 0.1.10
Filename, size File type Python version Upload date Hashes
Filename, size yaat-0.1.10.tar.gz (24.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page