A modern Python web framework filled with asynchronous salsa.
Project description
Bocadillo
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.
Quick start
Install it:
pip install bocadillo
Build something:
# app.py
from bocadillo import App, Templates
app = App()
templates = Templates(app)
@app.route("/")
async def index(req, res):
# Use a template from the ./templates directory
res.html = await templates.render("index.html")
@app.route("/greet/{person}")
async def greet(req, res, person):
res.media = {"message": f"Hi, {person}!"}
if __name__ == "__main__":
app.run()
Launch:
python app.py
Make requests!
curl http://localhost:8000/greet/Bocadillo
{"message": "Hi, Bocadillo!"}
Hungry for more? Head to the docs.
Contributing
See CONTRIBUTING for contribution guidelines.
Changelog
See CHANGELOG for a chronological log of changes to Bocadillo.
Roadmap
For a list of short, mid and long-term feature ideas currently in our scope, see the Roadmap.
To see what has already been implemented for the next release, see the Unreleased section of our changelog.
Credits
Logo:
- Designed by Florimond Manca.
- Sandwich icon designed by macrovector.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for bocadillo-0.12.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63d2a5b8d3157a46ab5ea199228c149ca96593f6120d785b5232cdd8ee870cce |
|
MD5 | 21ac495f667608c2c6c149fcd2a9ab59 |
|
BLAKE2b-256 | e0541814f93db055b2da130a85d6b985c0c147373995c228fde18e8fb7269bb5 |