Source

CherryPy Recipes / testing / unit / serverless / app.py

# -*- coding: utf-8 -*-
import cherrypy

class Root(object):
    @cherrypy.expose
    def index(self):
        return "hello world"

    @cherrypy.expose
    def echo(self, msg):
        return msg