Skip to main content

A little Python http framework

Project description

Python package Upload Python Package GitHub license

Bobtail

A little Python http framework

Install

pip install bobtail

Getting Started

from bobtail import BobTail, Request

    class Images:

        def get(self, req: Request):
            return {
                       "users": [{"id: 1"}, {"id: 2"}]
                   }, 200

        def post(self, req: Request):
            return None, 202

        def delete(self, req: Request):
            return None, 201

        def put(self, req: Request):
            return {
                       "id": 1,
                   }, 202

        def patch(self, req: Request):
            return {
                       "id": 1,
                   }, 202

    routes = [
        (Images(), "/images")
    ]

    app = BobTail(routes=routes)

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

bobtail-0.0.2.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distribution

bobtail-0.0.2-py3-none-any.whl (4.4 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