Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wichert/rest_toolkit
Simple REST servers
https://github.com/wichert/rest_toolkit
Last synced: 20 days ago
JSON representation
Simple REST servers
- Host: GitHub
- URL: https://github.com/wichert/rest_toolkit
- Owner: wichert
- License: bsd-2-clause
- Created: 2014-05-28T14:15:35.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-03-21T22:18:05.000Z (over 2 years ago)
- Last Synced: 2024-09-22T09:17:52.313Z (about 2 months ago)
- Language: Python
- Homepage: http://rest-toolkit.rtfd.org/
- Size: 474 KB
- Stars: 36
- Watchers: 6
- Forks: 7
- Open Issues: 9
-
Metadata Files:
- Readme: README.rst
- Changelog: changes.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-pyramid - rest_toolkit - is a Python package (RESTful API)
README
*rest_toolkit* is a Python package which provides a very convenient way to
build REST servers. It is build on top of
`Pyramid `_, but you do not
need to know much about Pyramid to use rest_toolkit.Quick example
=============This is a minimal example which defines a ``Root`` resource with a ``GET``
view, and starts a simple HTTP server. If you run this example you can request
``http://localhost:8080/`` and you will see a JSON response with a status
message.::
from rest_toolkit import quick_serve
from rest_toolkit import resource@resource('/')
class Root(object):
def __init__(self, request):
pass@Root.GET()
def show_root(root, request):
return {'status': 'OK'}if __name__ == '__main__':
quick_serve()