Search code examples
python-3.xcherrypy

How to best understand the relationship between cheroot vs cherrypy


I've read the official documentation but didn't find a definite answer. What is the relationship between cheroot and Cherrypy? I see Cherrypy imports a lot of codes from cheroot. Is it another project?


Solution

  • In the beginning, there was only CherryPy, which combined an HTTP server, an HTTP application-development framework, and some process and environment controls. At some point, I noticed other people were using the CherryPy HTTP server with other frameworks, like Django and Flask, but constantly complained about polluting their beautiful frameworks with (gasp) threadlocals and method dispatch. So I split out the HTTP server and the process controls into cheroot so such users could feel better about using it, and made a version of CherryPy which no longer included those modules but instead imported cheroot.