CherryPy is a popular framework of Python. Using CherryPy, web applications can be built in a faster and more reliable way. It is also called a web application library. It is known for its simplicity as it is based on object-oriented Python programming, resulting in smaller source code in less time. It is one of the oldest frameworks of Python, the very first version being released in June 2002. This framework is mainly for the developers who want to create portable database-driven web application using Python, as it provides Create, Retrieve, Update and Delete functionalities.
Note: Before proceeding with CherryPy, you should have a good understanding of Model-view-controller and Object-Oriented-Programming.
As we know, Object-Oriented-Programming in itself has many advantages. The Extensive Support Libraries in Python and its Open Source and Community Development along with OOP gives a strong base to CherryPy.
- Simplicity: The complexity is reduced as the software object model objects and hence the code structure is very legible.
- Modular: Each object forms a separate entity whose internal workings are decoupled from other parts of the system. This enables us to consistently improve our solutions and it leads to efficiency in development through reuse.
- Modifiability: Minor changes can be easily made as changes inside a class do not affect any other part of a program.
- Extensibility: New objects can be introduced and existing ones can be modified to add new features or update existing ones.
- Data Re-usability: The objects can be used in other programs.
- Data Redundancy: Inheritance can be applied if you need a same functionality in multiple class.
- Data hiding: Implementation details are hidden from other modules and other modules has a clearly defined interface.
- Security: Using data hiding and abstraction we are providing necessary data only it mean we are maintaining security.
- Open Source: It is a community-maintained, open-source project hosted at Github.
- Deployment: It binds HTTP protocol into an API and includes its own production-ready HTTP server for hosting applications in a cost effective manner.
The project founder, Remi Delon wished to make CherryPy as Pythonic as possible so that the developer can use the framework as any regular Python module.
Take a look at the most basic application, a “Hello World” program with CherryPy:
CherryPy takes an HTTP request and locates the most appropriate Python function or method that matches the request’s URL.
- Environment setup for CherryPy
- Introduction to OpenCV
- Introduction to pygame
- Introduction to PySimpleGUI
- Introduction to Tkinter
- Introduction to Python3
- Introduction to TensorFlow
- Introduction to Seaborn - Python
- Introduction to SQLite in Python
- Python Mahotas - Introduction
- Introduction to Bokeh in Python
- Introduction to Dask in Python
- CNN | Introduction to Pooling Layer
- Introduction to Dash in Python
- Introduction to Physical Security
- Introduction to Pandas in Python
- PLY (Python lex-Yacc) - An Introduction
- Jython - Introduction and Installation
- Python | Introduction to PyQt5
- Python | Introduction to Matplotlib
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.