def index(self):
        """Save green color in session at app index URI."""
        # Must modify data or the session will not be saved.
        cherrypy.session['color'] = 'green'
        return self.page()
Save green color in session at app index URI.
cherrypy/test/sessiondemo.py