Quick Start¶
A Minimal Bobtail app¶
from typing import Tuple, Optional, Dict
from bobtail import Bobtail, AbstractRoute, Request, Response
class Images:
def get(self, req, res):
res.set_body({id: 1})
routes = [
(Images(), "/images")
]
app = Bobtail(routes=routes)
Running Bobtail with Gunicorn¶
Bobtail requires a WSGI compatible server such as Gunicorn.
$ pipenv run gunicorn api:app