- Deployment Of Application
- CherryPy - Testing
- CherryPy - Demo Application
- CherryPy - Use Of Ajax
- CherryPy - Presentation Layer
- CherryPy - Web Services
- CherryPy - A Working Application
- CherryPy - ToolBox
- Bulit-in Http Server
- CherryPy - Vocabulary
- CherryPy - Environment Setup
- CherryPy - Introduction
- CherryPy - Home
CherryPy Useful Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
CherryPy - Vocabulary
There are a few important keywords which need to be defined in order to understand the working of CherryPy. The keywords and the definitions are as follows −
S.No | Keyword & Definition |
---|---|
1. | Web Server It is an interface deapng with the HTTP protocol. Its goal is to transform the HTTP requests to the apppcation server so that they get the responses. |
2. | Apppcation It is a piece of software which gathers information. |
3. | Apppcation server It is the component holding one or more apppcations |
4. | Web apppcation server It is the combination of web server and apppcation server. |
Example
The following example shows a sample code of CherryPy −
import cherrypy class demoExample: def index(self): return "Hello World!!!" index.exposed = True cherrypy.quickstart(demoExample())
Let us now understand how the code works −
The package named CherryPy is always imported in the specified class to ensure proper functioning.
In the above example, the function named index returns the parameter “Hello World!!!”.
The last pne starts the web server and calls the specified class (here, demoExample) and returns the value mentioned in default function index.
The example code returns the following output −
Advertisements