A modern Python web framework filled with asynchronous salsa.
Inspired by Responder, Bocadillo is a web framework that combines ideas from Falcon and Flask while leveraging modern Python async capabilities.
Under the hood, it uses the Starlette ASGI toolkit and the uvicorn ASGI server.
Write your first app:
# app.py
import bocadillo
api = bocadillo.API()
@api.route('/add/{x:d}/{y:d}')
async def add(req, resp, x: int, y: int):
resp.media = {'result': x + y}
if __name__ == '__main__':
api.run()
Run it:
python app.py
INFO: Started server process [81910]
INFO: Waiting for application startup.
INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
Make some requests!
curl "http://localhost:8000/add/1/2"
{"result": 3}
🌯💥
Want more? Head to the docs.
Bocadillo can be installed from source or from PyPI:
pip install bocadillo
All usage documentation has been moved to the docs site.
See CONTRIBUTING for contribution guidelines.
See CHANGELOG for a chronological log of changes to Bocadillo.
If you are interested in the future features that may be implemented into Bocadillo, take a look at our milestones.
To see what has already been implemented for the next release, see the Unreleased section of our changelog.