A little Python http framework
Project description
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
Release history Release notifications | RSS feed
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)