class Root: def index(self): sessId = cherrypy.session['id'] cherrypy.session['sessionData'] = {'a':1, 'b':2} return "Hello World\n %s " % (str(cherrypy.request)) index.exposed = True cherrypy.root = Root() cherrypy.config.update(file = 'tutorial.conf') settings = { 'global': {'session_filter.storage_class': MySessionStorage } } cherrypy.config.update(settings) cherrypy.server.start()