hero

Bocadillo

Fast, scalable and real-time capable web APIs for everyone

Get Started →

Latest release: 0.16.2

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.

Learn more about Bocadillo

Requirements

Python 3.6+

Installation

pip install bocadillo

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!):

uvicorn app:app --reload

Say hello!

$ curl http://localhost:8000
{"hello": "world"}

Ready to dive in?

Read the tutorial →