Skip to main content

Build status Test coverage License @bocadillopy on Twitter Say Thanks!

python versions pypi version code style

Documentation · Source code · CLI


Migrating from v0.13.x? Read the v0.14 release notes.

Bocadillo is a Python async web framework that makes server-side async web apps fun to build and accessible to everyone.

It is designed to be:

  • Productive: a carefully chosen set of included batteries helps you solve common and more advanced problems — request routing, app configuration, static files, data validation, and more!

  • Real-time capable: embrace asynchronous programming and the baked-in WebSocket and SSE support to build real-time, highly-concurrent systems.

  • Flexible: inject resources into web views using providers, an explicit, modular and easy-to-use mechanism inspired by pytest fixtures.

  • Performant: squeeze the juice out of Starlette and uvicorn, the lightning-fast ASGI toolkit and web server.

  • Empowering: use tailored testing and command line tools to build delicious, high-quality applications.

  • Transparent: every single feature is documented front to back and has optimal editor support thanks to a 100% type-annotated code base.

Quick start

  1. Install Bocadillo and the Bocadillo CLI:
pip install bocadillo bocadillo-cli
  1. Generate a project and cd into it:
bocadillo create hello
cd hello/
  1. Edit the application script:
# hello/app.py
from bocadillo import App

app = App()

@app.route("/")
async def index(req, res):
    res.text = "Hello, world!"
  1. Start a uvicorn server (hot reload enabled!):
uvicorn hello.asgi:app --reload
  1. Say hello!
$ curl http://localhost:8000
Hello, world!
  1. Edit app.py to send "Hello, Bocadillo!" instead, then hit save. Uvicorn will pick up the changes and restart the application. Try it out again:
$ curl http://localhost:8000
Hello, Bocadillo!

Tastes good! 🥪

Hungry for more? Head to the docs.

Changelog

We record changes to Bocadillo in the changelog. In particular, check out the Unreleased section to see what's coming in the next release.

Contributing

Found a bug? A typo? Want to help build a new feature? We'd love to see your contributions! There are also many ways to contribute that don't include code: helping with issues, laying out new ideas, improving docs, etc.

Check out our Contributing guide to get started.

By the way, here's our Contributor Hall of Fame. 👨‍💻👩‍💻

Credits

Logo designed by Florimond Manca. Sandwich icon designed by macrovector.

Metadata

Release files for bocadillo 0.16.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bocadillo 0.16.0
File Size Uploaded Provenance Actions
bocadillo-0.16.0.tar.gz 45.0 kB Without provenance Details for bocadillo-0.16.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for bocadillo 0.16.0
File Interpreter ABI Platform Actions
bocadillo-0.16.0-py3-none-any.whl Python 3 none any Details for bocadillo-0.16.0-py3-none-any.whl

Total release size: 113.9 kB

Release files / bocadillo-0.16.0.tar.gz

Download URL bocadillo-0.16.0.tar.gz
Size 45.0 kB
Tags Source
SHA-256 checksum
How to use checksums
17eefa562636e1d765406f9ed97f49eb2cbe30d0ae837971057db29da37f5757
BLAKE2b-256 checksum
How to use checksums
914a4b75e083d71dcadac9beb9239c7429f2bcf1ba3171a2854f6bf509a1a41f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

Release files / bocadillo-0.16.0-py3-none-any.whl

Download URL bocadillo-0.16.0-py3-none-any.whl
Size 69.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f534d010e5f068cc4cb81730ae6e714dc4accf76378e67b90ec9fd32157f0d5
BLAKE2b-256 checksum
How to use checksums
9dc57fd23679e1552c25fc8a6d2a700c41b2a43deec803fc2dc6093431989fc7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.7

Security for bocadillo 0.16.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.16.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page