{"id":5147,"library":"cherrypy","title":"CherryPy","description":"CherryPy is a pythonic, object-oriented HTTP framework that enables developers to build web applications in much the same way they would build any other object-oriented Python program. It includes a robust, HTTP/1.1-compliant, WSGI thread-pooled webserver. The library, currently at version 18.10.0, has a proven track record of stability and is actively maintained with several minor releases per year.","status":"active","version":"18.10.0","language":"en","source_language":"en","source_url":"https://github.com/cherrypy/cherrypy","tags":["web framework","http","object-oriented","wsgi","minimalist"],"install":[{"cmd":"pip install cherrypy","lang":"bash","label":"Install CherryPy"}],"dependencies":[{"reason":"High-performance, pure-Python HTTP server used by CherryPy.","package":"cheroot","optional":false},{"reason":"Process Bus for connecting components.","package":"magicbus","optional":false},{"reason":"Used for session concurrency support.","package":"zc.lockfile","optional":false},{"reason":"Optional dependency for Windows-specific features.","package":"pywin32","optional":true}],"imports":[{"note":"The main module for accessing CherryPy's core functionalities, decorators, and server controls.","symbol":"cherrypy","correct":"import cherrypy"}],"quickstart":{"code":"import cherrypy\n\nclass HelloWorld(object):\n    @cherrypy.expose\n    def index(self):\n        return \"Hello World!\"\n\nif __name__ == '__main__':\n    # By default, CherryPy binds to 127.0.0.1:8080 (localhost)\n    # To make it accessible from other machines, set 'server.socket_host' to '0.0.0.0'\n    # cherrypy.config.update({'server.socket_host': '0.0.0.0'})\n    cherrypy.quickstart(HelloWorld())\n","lang":"python","description":"This minimal example demonstrates a 'Hello World' application. Define a class with a method (e.g., `index`) and decorate it with `@cherrypy.expose` to make it accessible via a URL. Then, start the CherryPy server using `cherrypy.quickstart()` with an instance of your application class."},"warnings":[{"fix":"Upgrade to Python 3.6 or newer, or pin CherryPy to a version < 18.0.0.","message":"CherryPy 18.0.0 dropped support for Python 2.7 and Python 3.4. Users on these Python versions must use an older CherryPy version (e.g., CherryPy 17 LTS).","severity":"breaking","affected_versions":">=18.0.0"},{"fix":"Migrate to the newer `auth_basic` and `auth_digest` tools or implement custom authentication solutions.","message":"The `basic_auth` and `digest_auth` tools, along with the `httpauth` module, were officially deprecated in v14.0.0 and subsequently removed in v16.0.0.","severity":"breaking","affected_versions":">=16.0.0"},{"fix":"To make the application accessible from other network machines, update the server configuration: `cherrypy.config.update({'server.socket_host': '0.0.0.0'})`.","message":"By default, CherryPy's built-in HTTP server binds to `127.0.0.1` (localhost). This means your application is only accessible from the machine it's running on.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Always apply `@cherrypy.expose` to methods that should serve HTTP requests.","message":"Methods intended to be exposed as web endpoints (accessible via URL) must be decorated with `@cherrypy.expose`. Forgetting this decorator will result in a 404 Not Found error for that URL path.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure your Python environment is 3.8+ if using the latest Cheroot, or pin Cheroot to an older version compatible with Python 3.6/3.7 if necessary.","message":"Cheroot, CherryPy's underlying HTTP server, dropped support for Python 3.6 and 3.7, now requiring Python 3.8 or later as of its recent releases. While CherryPy itself states support up to 3.11, newer Cheroot versions might introduce a conflict for older Python environments.","severity":"breaking","affected_versions":"CherryPy using recent Cheroot versions"}],"env_vars":null,"last_verified":"2026-04-13T00:00:00.000Z","next_check":"2026-07-12T00:00:00.000Z"}