CherryPy Interview Questions for Beginners

CherryPy Interview Questions

What is CherryPy?

CherryPy is an object-oriented HTTP web application framework based on Python programming language. Below is the list of top CherryPy interview questions and answers that are asked by the interviewer in an interview where CherryPy framework skills are required.

Download CherryPy Interview Questions PDF

Below are the list of Best CherryPy Interview Questions and Answers

CherryPy is an object-oriented HTTP web application framework based on Python programming language.CherryPy is designed for rapid development of web applications and allows developers to build web applications in much the same way they would build any other object-oriented Python program. This results in smaller source code developed in less time.It is an open-source project, you are free to fork CherryPy on GitHub(https://github.com/cherrypy/cherrypy) here and submit pull-request with your modifications.

CherryPy is now more than ten years old and it is has proven to be very fast and stable. It is being used in production by many sites, from the simplest to the most demanding. Also,

  • It can run anywhere Python runs
  • It does not require a C compiler
  • It can run on various implementations of the Python language: CPython, IronPython, Jython and PyPy

Below is list of some key features of Cherrypy Framework

  • A reliable, HTTP/1.1-compliant, WSGI thread-pooled web server.
  • Easy to run multiple HTTP servers (e.g. on multiple ports) at once.
  • A powerful configuration system for developers and deployers.
  • A flexible plugin system.
  • Built-in tools for caching, encoding, sessions, authentication, static content, and much more.
  • In CherryPy everything is swappable and customizable.
  • Built-in profiling, coverage, and testing support.
  • Runs on Python 2.7+, 3.1+, PyPy, Jython and Android.

Read More from http://cherrypy.org/

CherryPy does not have any mandatory requirements. CherryPy comes with pluggable components or modules.To use a certain feature you need to install certain packages

The basic requirements for installation of CherryPy framework include

  • Python with version 2.7 or above
  • CherryPy 3.0

CherryPy can be easily installed via common Python package managers such as setup tools or pip.

$ easy_install cherrypy
pip install cherrypy

You may also get the latest CherryPy version by grabbing the source code from Github:

$ git clone https://github.com/cherrypy/cherrypy
$ cd cherrypy
$ python setup.py install

Disabling File Logging in CherryPy :

To disable file logging in CherryPy, simply set an empty string to the log.access_file or log.error_file keys in your global configuration.

cherrypy.config.update({'log.access_file': '',
                        'log.error_file': ''})

Disabling Console Logging in CherryPy :

To disable Console logging in CherryPy, simply set log.screen to False in your global configuration.

cherrypy.config.update({'log.screen': False})