Helper utilities for building JSON APIs with CherryPy.


License
BSD-3-Clause
Install
pip install CherryOnTop==1.0

Documentation

CherryOnTop

CherryOnTop is a library for building JSON API's in Python with CherryPy.

  • Routing: Built in support for binding static and dynamic URLs in place (a la Bottle or Flask).
  • Server: The power and stability of the CherryPy engine.
  • Utilities: Handling for JSON request/response payloads, descriptive messages and clean propagation for error conditions.

Hello world

from cherryontop import get, start_server

@get("/hello/:name")
def hello_world(name):
    return {"message": "Hello {}!".format(name)}

start_server()

Run this script then point your browser to http://localhost:8080/hello/world. That's all there is to it.

Download and Install

pip install cherryontop to install the latest stable release.

License

Code, tutorials, and documentation all released under the BSD license (see LICENSE).