Skip to main content

A modern Python web framework filled with asynchronous salsa.

Project description

A modern Python web framework filled with asynchronous salsa.


travis python downloads pypi 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}')
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

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

Uploaded Source

Built Distribution

bocadillo-0.8.0-py3-none-any.whl (29.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bocadillo-0.8.0.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3

File hashes

Hashes for bocadillo-0.8.0.tar.gz
Algorithm Hash digest
SHA256 6c30bdb31890722b03d7b47e2452bbf2ad13d89f759b2155b0288f69bf01cd03
MD5 de909ff1a33e4cbc5cf34e1e378dac79
BLAKE2b-256 c62353db2b475c87910fa31b6ddb37863477022f7593b668d725b08bc5740092

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bocadillo-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 29.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3

File hashes

Hashes for bocadillo-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 883b63a4a688278f0ec0bcccd1e590186f77588c7675fbe2214b19e19a1c3750
MD5 1ed55a95177d8d4bad234e715891a922
BLAKE2b-256 9cebb3024cd82080cd3cdf8da4635cc7c5bea5624745d9ae3a9647db577f5d9d

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