Yet another ASGI toolkit
Yaat is an asynchronous web toolkit. It is as simple as...
from yaat import Yaat from yaat.responses import TextResponse app = Yaat() @app.route("/") async def index(request): return TextResponse("Hello World")
- 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.
Yaatsupports the loose coding style. It does not force any solution, and how the project should be structured is decided by the developer.
pip3 install yaat
For example, if you put the example code from the top in
app.py. You can run the application by
you can check out complete examples in
- aiofiles - to read files for
- httpx - for test client.
- Jinja2 - to use
Jinja2Templatefor template responses.
- parse - for parsing path parameters.
- python-multipart - for form parser,
- PyYAML - for schema generator.
Yaat is licensed under GNU Lesser General Public License.
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.
More features will be added in the future. You can check out the project board.