Skip to main content

A modern Python web framework filled with asynchronous salsa.

Project description


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

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.

Read the documentation

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


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.12.3.tar.gz (27.8 kB view details)

Uploaded Source

Built Distribution

bocadillo-0.12.3-py3-none-any.whl (35.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bocadillo-0.12.3.tar.gz
Algorithm Hash digest
SHA256 c8fe6aabe766625eee147ab77fb8547507081906be188edc537a97759dbf2697
MD5 1f4f56049c6bbafcef2922ef98ce3479
BLAKE2b-256 b4e71811a259b769f45bb2c881f72d688d7bd4b9d7c002fb437678c50ea4679b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bocadillo-0.12.3-py3-none-any.whl
  • Upload date:
  • Size: 35.7 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/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.3

File hashes

Hashes for bocadillo-0.12.3-py3-none-any.whl
Algorithm Hash digest
SHA256 083cb904ab179f4b3b6f9a9b29b3d989f891628f1acfe3e25e8dd72221cd7ea3
MD5 91a59c09d33f8725525b281b1d77e1e9
BLAKE2b-256 6b78d842579680717f81eb554c828313d73492d856cbee57d791d88152b1157d

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