Skip to content

wichert/rest_toolkit

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
doc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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()

About

Simple REST servers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •  

Languages