skillfed

cherrypy-cors

CORS handling as a cherrypy tool.

cherrypy-cors v1.7.0 131.0K downloads/30d#11,613 on PyPI0
Permissive license Active released

What it is and what it does

cherrypy-cors is a CherryPy tool that handles Cross-Origin Resource Sharing (CORS) headers for web applications. It lets you enable CORS either globally across your entire application or selectively for specific routes and resources, managing the HTTP headers that browsers use to determine whether cross-origin requests are allowed.

The package integrates directly into CherryPy's configuration system, so you enable it by adding tool settings to your route or application config rather than writing custom middleware. It has been stable since its initial release and requires only CherryPy and httpagentparser as runtime dependencies, making it lightweight to add to existing CherryPy projects.

Use it for:

  • Enable a CherryPy-based API to accept requests from web frontends hosted on different domains.
  • Selectively expose static resources (CSS, JavaScript, images) to cross-origin requests while protecting other endpoints.
  • Configure CORS headers for specific application routes without modifying core request handling logic.
  • Allow browser-based clients to make XMLHttpRequest or Fetch API calls to your CherryPy backend.

Worth the install?

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

Adds Cross-Origin Resource Sharing (CORS) support to CherryPy applications via a configurable tool that can be installed globally or per-application.

Yes. This is a lightweight, actively maintained tool for a common need in web development. If you're building a CherryPy application that needs to serve cross-origin requests, it's the natural choice. The permissive MIT license and low dependency count make it safe to add. No known vulnerabilities.

Install

cherrypy-cors on PyPI

pip

pip install cherrypy-cors

uv

uv add cherrypy-cors

poetry

poetry add cherrypy-cors

Installing cherrypy-cors

Before you install

Low friction installation with only two runtime dependencies (cherrypy and httpagentparser). The package is actively maintained with a recent release in August 2023 and an active repository.

License in practice

MIT license (permissive) means you can use, modify, and distribute this package freely in both open-source and commercial projects with minimal restrictions.

Quickstart

import cherrypy_cors
cherrypy_cors.install()

# Or add to specific app:
app = cherrypy.tree.mount(...)
app.toolboxes['cors'] = cherrypy_cors.tools

# Enable in config:
config = {'tools.cors.expose.on': True}

Requires CherryPy to be installed and configured; Python 3.8 or later.

Verify before relying

  • Whether the package supports all modern CORS scenarios (preflight requests, credential handling, custom headers).
  • Performance characteristics when handling high request volumes.
  • Compatibility with recent CherryPy versions beyond what the fact sheet indicates.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.8)
Install friction low — pure-Python wheel
Runtime dependencies 2 — cherrypy, httpagentparser
Maintenance actively maintained — 1,082 days since the last release
Last repo commit
First released
Downloads 131,017/month — #11,613 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: cherrypy_cors-1.7.0-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: Only

Tags

cherrypy cors supportcross-origin resource sharing cherrypycors middleware cherrypycherrypy http headerscherrypy tool corsenable cors cherrypycherrypy cross-origin
corscherrypy-integrationweb-middleware

More WWW/HTTP packages