Skip to main content

A modern Python web framework filled with asynchronous salsa.

Project description

A modern Python web framework filled with asynchronous salsa.


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.

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

Uploaded Source

Built Distribution

bocadillo-0.10.3-py3-none-any.whl (33.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bocadillo-0.10.3.tar.gz
  • Upload date:
  • Size: 25.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.2 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.3

File hashes

Hashes for bocadillo-0.10.3.tar.gz
Algorithm Hash digest
SHA256 a5ef52f99054ad1453e805e48084aa79b87e8e75fc253a603b059b87674e6c94
MD5 6bf31f08574c9ba8f6e18c5762ff72fb
BLAKE2b-256 fbfa24ef42d7d6b5f8bce20ab15c6e32aa59cf006c95732879415d2b81411d87

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bocadillo-0.10.3-py3-none-any.whl
  • Upload date:
  • Size: 33.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.2 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.6.3

File hashes

Hashes for bocadillo-0.10.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8123c9a612fd511bc61e632fe0546e84c4b22b36786c0d209670da4ed38fcc1e
MD5 3b6b7444fcb8fe4929e5c66a592bc12f
BLAKE2b-256 362dd62fe958a4f8e9e268b04e29cb9e3a641e0614ffba17dcba48c05148114c

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