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 license

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

Uploaded Source

Built Distribution

bocadillo-0.6.1-py3-none-any.whl (24.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for bocadillo-0.6.1.tar.gz
Algorithm Hash digest
SHA256 ef3e81bb8c2b3dc968d6056bce2c940c4554cbb946e6635143c43beebe21e602
MD5 cbae1d3d4969d7642d0ba42b6bcc16b8
BLAKE2b-256 1044ccf9b70db99003708d4f57a22e22038d9ea268a651db1d3fb088bfd9aac6

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for bocadillo-0.6.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c7a9593bf5051ccd9d24c5c2d8de54580fdb02d2b84893c8998c57c5989c90f2
MD5 cc3bdc4654f43756870ba6d72854e206
BLAKE2b-256 07a9d57aeef5ee38d358e0daa50dc2c4ee75a76b6f34bd64d6d92ffc9c7c195d

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