Web Frameworks & APIs

CherryPy

One of the internet's longest-running Python web tools, still quietly humming along.

Install it: pip install cherrypy

What does it do?

CherryPy treats a website almost like a regular Python program with objects and methods, rather than a tangle of separate configuration files — you write ordinary Python classes, and CherryPy turns their methods into webpages visitors can reach. It bundles its own built-in server, so there’s no need to hunt down separate software just to get something running. That object-oriented approach was unusual when it first appeared and gave CherryPy a distinct, tidy feel among its contemporaries.

See it in action

This code defines a tiny website that says “Hello, world!” and starts it running as a self-contained program.

import cherrypy

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

cherrypy.quickstart(HelloWorld())

Why would a non-developer care?

CherryPy matters less as a trendy new choice and more as proof of concept: it’s been running real production websites since the early 2000s, quietly showing that a simple, well-designed tool can outlast plenty of flashier newcomers.

Real-world examples

CherryPy has powered internal business tools and smaller production sites for two decades largely because teams that adopted it early found little reason to move away from something so stable. Without long-lived, dependable options like this, teams would face constant migration churn every time a newer framework trend took over.

Who uses it

Teams maintaining long-running internal tools and developers who prefer working with plain Python objects over heavier configuration-driven frameworks.

How it compares to alternatives

CherryPy predates Flask and Django’s dominance and occupies a similar minimalist niche to Bottle, though its object-oriented style sets it apart stylistically from both.

Fun fact

CherryPy has been actively maintained since 2002, making it one of the oldest Python web frameworks still in regular use today.

New to Python and want to actually try libraries like this yourself?

Find a beginner-friendly course

Related libraries