--- id: cherrypy-cors version: "1.7.0" license: unclear license_treatment: permissive maintenance: active --- # cherrypy-cors — CORS handling as a cherrypy tool. License: permissive · Maintenance: active · Downloads: 131.0K/mo ## 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 above — 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 pip install cherrypy-cors uv add cherrypy-cors 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_current - Install friction: low - Maintenance: active - Downloads: 131.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags cherrypy cors support, cross-origin resource sharing cherrypy, cors middleware cherrypy, cherrypy http headers, cherrypy tool cors, enable cors cherrypy, cherrypy cross-origin, cors, cherrypy-integration, web-middleware [View on SkillFed](https://skillfed.io/packages/cherrypy-cors) · [View on PyPI](https://pypi.org/project/cherrypy-cors/)