Skip to main content

A modern Python web framework filled with asynchronous salsa.

Project description


python pypi travis black codecov license Join the chat at https://gitter.im/bocadilloproject/bocadillo

Documentation / CLI / Twitter / Blog / Mentions / FAQ

Bocadillo is a modern Python web framework that aims at making async web apps and services fun to build and accessible to everyone. We ultimately believe that web frameworks should be fun and easy to use while empowering the developer to make good decisions and ship high-quality applications.

It is designed to be:

  • Productive: a carefully chosen set of included batteries* helps you solve common and more advanced problems.

  • 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.

*The bucket list: HTTP, WebSocket, SSE, CORS, HSTS, GZip, Jinja2 templates, dependency injection, background tasks, streaming, middleware, redirection, error handling, class-based views, view hooks, media responses, file responses, attachments, static files serving, test client, event handlers…

Quick start

We all love delicious "Hello, world!" examples, don't we? Here's ours:

  1. Install Bocadillo:
pip install bocadillo
  1. Write the app:
from bocadillo import App

app = App()

@app.route("/")
async def index(req, res):
    res.text = "Hello, world!"

if __name__ == "__main__":
    app.run()
  1. Start the server:
python app.py
  1. Say hello!
$ curl http://localhost:8000
Hello, world!

Tastes good! 🥪

Hungry for more? Head to the docs.

Changelog

Changes made to Bocadillo across releases are recorded in the Changelog. Be sure to check it out to see where we're coming from!

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 the changelog.

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 for more information.

By the way, here's our Contributor Hall of Fame:

Credits

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bocadillo-0.13.2.tar.gz (33.5 kB view details)

Uploaded Source

Built Distribution

bocadillo-0.13.2-py3-none-any.whl (42.2 kB view details)

Uploaded Python 3

File details

Details for the file bocadillo-0.13.2.tar.gz.

File metadata

  • Download URL: bocadillo-0.13.2.tar.gz
  • Upload date:
  • Size: 33.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3

File hashes

Hashes for bocadillo-0.13.2.tar.gz
Algorithm Hash digest
SHA256 8574f06941e90bfe2b11b19bd4c025060b33184bc603971b85df15c1deca53da
MD5 936de10bf527bdbb4e90461b624d2ed8
BLAKE2b-256 117a3dd45a6169e13388a1018b84c6cf616b5357d04a600fac33e6a2ec59d097

See more details on using hashes here.

File details

Details for the file bocadillo-0.13.2-py3-none-any.whl.

File metadata

  • Download URL: bocadillo-0.13.2-py3-none-any.whl
  • Upload date:
  • Size: 42.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3

File hashes

Hashes for bocadillo-0.13.2-py3-none-any.whl
Algorithm Hash digest
SHA256 87eacccb1942a1fb4453903e9eb362b9f7bef759cebed8d912e4c9481d0a5739
MD5 fddd06912b5e0af257231e755f80816c
BLAKE2b-256 6addbded4d5388ca0bd55a9a2c1f64e02762889a1caf3ad2e8b222ec1a7dc247

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page