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):
    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.0.tar.gz (14.6 kB view hashes)

Uploaded Source

Built Distribution

bocadillo-0.6.0-py3-none-any.whl (20.2 kB view hashes)

Uploaded Python 3

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