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:

# 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

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

Uploaded Source

Built Distribution

bocadillo-0.11.1-py3-none-any.whl (31.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bocadillo-0.11.1.tar.gz
  • Upload date:
  • Size: 23.9 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.11.1.tar.gz
Algorithm Hash digest
SHA256 6c33e03be668d09f538cec35d41b86f199622dbd157b71728288c0d465962905
MD5 0cf141c3c8eb8a2f4dd714344f176be3
BLAKE2b-256 09d997c0d85874995285cee1aff3c44890ebd75aa1e25600edaad5cb6ea8fdd3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bocadillo-0.11.1-py3-none-any.whl
  • Upload date:
  • Size: 31.1 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.11.1-py3-none-any.whl
Algorithm Hash digest
SHA256 70badb82163b40ba1c0f8a1e0a6e57e27551d5bd502bdd87e184f92ab442ba6c
MD5 82898ca6ed83298979a58c1cbbef9666
BLAKE2b-256 79f382ba0e25652153e7a2869e4e3aa96f96e4ad5281b46df05948a41e46ac05

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