Android Programming

Python Web S1E1 : Cherrypy - HelloWorld

Cherrypy is an object oriented web framework that is quite clean and minimalistic. This is makes it easy to pick up. The best thing about it is that it allows you build your web applications in the same way you would build any of your application when using the Object Oriented Paradigm. With this framework you write smaller source code to get things done. We are going to cover alot of tutorials about Cherrypy. This is our first, hello world application. It's mainly to do with installation and writing our first hello world app that routes functions to differnt urls to output basic html. Cherypy doesn't require any special requirements for it to be installed or run. It can run anywhere python can run: Install it using any of the following commands:
$ easy_install cherrypy
$ pip install cherrypy
  You can also get it from github:
$ git clone
$ cd cherrypy
$ python install
  For more information on cherrypy installation please here is detailed guide.

Tools Used

Language : Python 3.5, HTML Platform : Backend and Fronted Web IDE : PyCharm Topics : Object Oriented Python, Cherrypy install,Cherrypy hello world, Cherrypy Routing

Questions this Project answers.

  • How to install Cherrypy.
  • CherryPy web development example
  • Cherrypy Routing example

Libraries Used

These are the third party CSS and JS used in this project.
  • None.


  • Here's the screenshot of the project. CherryPy Hello World

Project Structure

  • Here's the structure of the project.
CherryPy HelloWorld Project Structure

Source Code

Lets have a look at the source code. [su_tabs] [su_tab title=""]
  • Our Main class.
  • We route different methods to urls here.
  • We'll have two methods: index and about function which will each be mapped to different urls.
import cherrypy

class Index(object):

    def index(self):
        return open('index.html')

    def about(self):
        return """
               <head><title>About Us</title></head>
               <h1>About Us</h1>
               <p>This is our first python class.This is about us page</p>

if __name__=='__main__':


  • Video version of this tutorial.


  • Download the Project below:

How to Download and Run.

  1. Download the project above.
  2. You'll get a zipped file,extract it.
  3. Import into your IDE and run.


  • Visit our channel for more examples like these.
  • Lets share tips and ideas in our Facebook Page.