Create APIs to handle requests directly

Issue #115 new
Adam Victor Brandizzi
repo owner created an issue

Ok, I just reached that point where we discover object mappers are not that great.

We need some APIs to handle requests directly, something like this:

>>> def handler(req):
...     path = os.path.join('/opt/dir', req.path)
...     if os.path.exists(path):
...         return open(path).read()
...     else:
...         raise NotFound(path)
>>> with Server(handler):
...     requests.get('blablaa')

Comments (2)

  1. Log in to comment