skillfed

CherryPy

Object-Oriented HTTP framework

cherrypy v18.10.0 897.1K downloads/30d#4,785 on PyPI1,945
Permissive license Active released

What it is and what it does

CherryPy is a web framework that treats HTTP endpoints as Python object methods. Instead of routing URLs to functions, you define classes with methods decorated with @cherrypy.expose, and CherryPy automatically maps the object hierarchy to web paths. This approach aligns web development with standard object-oriented Python patterns, making code more readable and maintainable as applications grow.

The framework has been in production use for many years and is designed to be both intuitive for simple applications and capable of handling complex systems. It includes a built-in WSGI-compliant server, supports multiple Python implementations (CPython, PyPy, Jython), and provides configuration flexibility. The seven runtime dependencies are lightweight utilities for server functionality, file locking, and metadata handling.

Use it for:

  • Build a REST API by exposing Python class methods as HTTP endpoints without explicit routing configuration.
  • Create a web application where URL structure naturally mirrors your Python object model.
  • Develop a microservice or internal tool that needs a lightweight HTTP server without framework overhead.
  • Prototype or build production web services that prioritize code clarity and Pythonic design patterns.
  • Integrate HTTP capabilities into an existing Python application with minimal additional dependencies.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

CherryPy is an object-oriented HTTP framework that lets you build web applications and APIs by writing Python classes and methods, then expose them as web endpoints.

Yes. CherryPy is a mature, actively maintained framework with low installation friction, no security vulnerabilities, and a permissive license. It's well-suited if you prefer object-oriented design patterns in web development and want a lightweight alternative to larger frameworks. The 791-day gap since the last release suggests stability rather than abandonment, but verify that current Python versions align with your needs.

Install

cherrypy on PyPI

pip

pip install cherrypy

uv

uv add cherrypy

poetry

poetry add cherrypy

Installing CherryPy

Before you install

Installation is straightforward with low friction. The package is actively maintained (last commit 2026-08-10) and marked as Production/Stable. Seven runtime dependencies are all standard utilities, and the wheel distribution ensures fast setup.

License in practice

Licensed under BSD (permissive), which allows commercial and private use with minimal restrictions. No licensing concerns for adoption.

Quickstart

pip install cherrypy

import cherrypy

class HelloWorld(object):
    @cherrypy.expose
    def index(self):
        return "Hello World!"

cherrypy.quickstart(HelloWorld())

Requires Python 3.6 or later; on Windows, pywin32 is a runtime dependency.

Verify before relying

  • Whether the 791 days since last release (2024-06-14) indicates a stable mature project or one that may need updates for newer Python versions.
  • Performance characteristics and scalability limits compared to other frameworks in production deployments.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.6)
Install friction low — pure-Python wheel
Runtime dependencies 7 — cheroot, portend, more-itertools, zc.lockfile, jaraco.collections, importlib-metadata, pywin32
Maintenance actively maintained — 791 days since the last release
Last repo commit
First released
Downloads 897,074/month — #4,785 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: CherryPy-18.10.0-py3-none-any.whl

Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: CherryPyIntended Audience :: DevelopersLicense :: Freely DistributableLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: ImplementationProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: JythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTPTopic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Internet :: WWW/HTTP :: HTTP ServersTopic :: Internet :: WWW/HTTP :: WSGITopic :: Internet :: WWW/HTTP :: WSGI :: ApplicationTopic :: Internet :: WWW/HTTP :: WSGI :: ServerTopic :: Software Development :: Libraries :: Application Frameworks

Tags

python web frameworkobject-oriented http serverlightweight web application frameworkpython rest api frameworkwsgi application serverpython web developmenthttp server library
web-frameworkobject-orientedwsgi-server

More WWW/HTTP packages