A modern Python web framework filled with asynchronous salsa.
Bocadillo is a Python web framework that provides a sane toolkit for quickly building performant web applications and services, while encouraging best practices and keeping developer experience in mind.
Under the hood, it uses the Starlette ASGI toolkit and the lightning-fast uvicorn ASGI server.
Install it:
pip install bocadillo
Build something:
# api.py
import bocadillo
api = bocadillo.API()
@api.route('/')
async def index(req, res):
res.html = await api.template('index.html')
@api.route('/greet/{person}')
def greet(req, res, person):
res.media = {'message': f'Hi, {person}!'}
if __name__ == '__main__':
api.run()
Launch:
python api.py
Make requests!
curl http://localhost:8000/greet/Bocadillo
{"message": "Hi, Bocadillo!"}
Hungry for more? Head to the docs.
See CONTRIBUTING for contribution guidelines.
See CHANGELOG for a chronological log of changes to Bocadillo.
To see what has already been implemented for the next release, see the Unreleased section of our changelog.