Bocadillo (original) (raw)
What is Bocadillo?
Bocadillo is a Python asynchronous and ASGI web framework that makes building performant and highly concurrent web APIs fun and accessible to everyone.
Productive
Bocadillo is an ASGI web framework designed to help you build, test and deploy web APIs as easily as possible. It focuses on modularity, has thorough documentation, and integrates seamlessly with third-party async libraries.
Real-time capable
Embrace asynchronous programming and use the built-in WebSocket and SSE support to design real-time, highly-concurrent systems.
Performant
Bocadillo makes the most out of Starlette and Uvicorn, the lightning-fast ASGI toolkit and web server.
Requirements
Python 3.6+
Installation
Example
from bocadillo import App, configure
app = App()
configure(app)
@app.route("/")
async def index(req, res):
res.json = {"hello": "world"}
Save this as app.py
, then start a uvicorn server (hot reload enabled!):
Say hello!
$ curl http://localhost:8000
{"hello": "world"}
Ready to dive in?