A modern Python web framework filled with asynchronous salsa.
NOTE: v0.9 contains breaking API changes compared to 0.8.x and below. Review the changelog to know if you are affected and read about migration tips.
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:
# api.py
import bocadillo
api = bocadillo.API()
@api.route("/")
async def index(req, res):
# Use a template from the ./templates directory
res.html = await api.template("index.html")
@api.route("/greet/{person}")
async 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.
Contributing
See CONTRIBUTING for contribution guidelines.
Changelog
See CHANGELOG for a chronological log of changes to Bocadillo.
Roadmap
To see what has already been implemented for the next release, see the Unreleased section of our changelog.
Metadata
Release files for bocadillo 0.9.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bocadillo-0.9.1.tar.gz | 24.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bocadillo-0.9.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 57.2 kB
Release files / bocadillo-0.9.1.tar.gz
| Download URL | bocadillo-0.9.1.tar.gz |
|---|---|
| Size | 24.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1b24011ff313f082cd71ffde4f575a7ed3c2fedf25318c651af5967e9d66af93
|
|
BLAKE2b-256 checksum How to use checksums |
ec8f5581e84534d17627ca9a753ee9d28a5acad9baaa0c6c3b0e7a73e425278c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3
|
Release files / bocadillo-0.9.1-py3-none-any.whl
| Download URL | bocadillo-0.9.1-py3-none-any.whl |
|---|---|
| Size | 32.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
00d03f43a74cdb658443ad79792d80e921938fab7afe8467bb8d4a00287db283
|
|
BLAKE2b-256 checksum How to use checksums |
45f37c2df781a5bf264900de2a172fb585403b1b2bf5387822207ef82d313772
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3
|