Mercurial > p > roundup > code
view roundup/rest.py @ 5556:d75aa88c2a99 REST-rebased
Added RestInstance and calling rest from client.py
committer: Ralf Schlatterbeck <rsc@runtux.com>
| author | Chau Nguyen <dangchau1991@yahoo.com> |
|---|---|
| date | Tue, 29 Jan 2019 15:27:37 +0100 |
| parents | |
| children | 213a56c91471 |
line wrap: on
line source
# Restful API for Roundup # # This module is free software, you may redistribute it # and/or modify under the same terms as Python. # import json import pprint class RestfulInstance(object): """Dummy Handler for REST """ def __init__(self, db): # TODO: database, translator and instance.actions self.db = db def dispatch(self, method, uri, input): print method print uri print type(input) pprint.pprint(input) return ' '.join([method, uri, pprint.pformat(input)])
