$npx skillfedfor your agent

Sanic-Cors

A Sanic extension adding a decorator for CORS support. Based on flask-cors by Cory Dolphin.

SkipPyPI Python ModulesReleased Oct 2022311.1K downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — Sanic_Cors-2.2.0-py2.py3-none-any.whl
v2.2.0 · released 2022-10-07 · 2 runtime deps: sanic, packaging

No. While Sanic-CORS provides straightforward CORS support with low install friction and permissive licensing, the project is abandoned (last commit January 2023) and carries two known security vulnerabilities. For new projects, consider alternatives or implement CORS handling directly. For existing projects already using it, evaluate whether upgrading to a maintained solution is feasible.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Sanic-CORS requires routes to explicitly include 'OPTIONS' in the methods list to handle CORS preflight requests, unless automatic_options is enabled.
  • Installation is straightforward with low friction.
  • The package depends only on sanic and packaging.

License · maintenance · safety

MIT (permissive) — MIT license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.

last release 2022-10-07 (1407 days) · last repo commit 2023-01-30 · 162 stars

2 known vulnerabilities (OSV.dev, 2026-08-14) · 311,128 downloads/mo, #7,740 on PyPI

Verify before relying

pip install sanic-cors

from sanic import Sanic
from sanic.response import text
from sanic_cors import CORS

app = Sanic(__name__)
CORS(app)

@app.route("/", methods=['GET', 'OPTIONS'])
def hello_world(request):
    return text("Hello, cross-origin-world!")
  • Whether the two known vulnerabilities (GHSA-94jw-hqvj-vw74, PYSEC-2026-3539) have been patched or remain unresolved in version 2.2.0.
  • Compatibility status with current Sanic versions beyond the notices provided for v21.9, v21.12, and v22.9.
  • Whether the package will receive security updates or bug fixes despite abandonment status.
Same gist for agents: .md · .json

What it is and what it does

Sanic-CORS is a Sanic web framework extension that handles Cross-Origin Resource Sharing (CORS) headers and preflight requests, allowing your Sanic application to safely serve cross-origin AJAX requests. It is based on flask-cors and provides both a global initialization approach and per-route decorator patterns for fine-grained control over which origins, methods, and headers are allowed.

The extension operates with a permissive default philosophy: when enabled globally, it allows CORS for all origins and methods on all routes unless you explicitly configure restrictions. It includes an automatic_options feature to handle OPTIONS preflight responses without manual route configuration. The package depends on sanic and packaging, and supports Python 3.7 through 3.10. However, the project has been abandoned since early 2023, with the last release in October 2022, and carries two known security vulnerabilities.

Use it for

  • Enable CORS globally on a Sanic API to allow browser-based clients from any origin to make cross-origin requests.
  • Configure CORS selectively for specific API routes using the @cross_origin decorator to restrict which origins can access sensitive endpoints.
  • Set up resource-level CORS policies by mapping URL patterns to specific allowed origins, methods, and headers in the resources parameter.
  • Automatically handle CORS preflight OPTIONS requests without manually implementing OPTIONS handlers on each route.
  • Integrate CORS support into a Sanic application managed by Sanic-Ext using the plugin system.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Skip

No.

While Sanic-CORS provides straightforward CORS support with low install friction and permissive licensing, the project is abandoned (last commit January 2023) and carries two known security vulnerabilities. For new projects, consider alternatives or implement CORS handling directly. For existing projects already using it, evaluate whether upgrading to a maintained solution is feasible.

Install

sanic-cors on PyPI

Before you install

Installation is straightforward with low friction. The package depends only on sanic and packaging. However, maintenance is a concern: the last release was October 2022 and the repository shows no commits since January 2023, indicating the project is abandoned despite the repository not being formally archived.

Sanic-CORS requires routes to explicitly include 'OPTIONS' in the methods list to handle CORS preflight requests, unless automatic_options is enabled.

License in practice

MIT license is permissive and poses no restrictions on use, modification, or distribution in commercial or private projects.

Quickstart

pip install sanic-cors

from sanic import Sanic
from sanic.response import text
from sanic_cors import CORS

app = Sanic(__name__)
CORS(app)

@app.route("/", methods=['GET', 'OPTIONS'])
def hello_world(request):
    return text("Hello, cross-origin-world!")

Verify before relying

  • Whether the two known vulnerabilities (GHSA-94jw-hqvj-vw74, PYSEC-2026-3539) have been patched or remain unresolved in version 2.2.0.
  • Compatibility status with current Sanic versions beyond the notices provided for v21.9, v21.12, and v22.9.
  • Whether the package will receive security updates or bug fixes despite abandonment status.

Package facts

LicenseMIT permissive
Python supportNot specified
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
sanicpackaging
MaintenanceAbandoned 1,407 days since the last release
Last repo commit
First released
Downloads311,128 / month, #7,740 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilities2 GHSA-94jw-hqvj-vw74, PYSEC-2026-3539
Classifiers
Environment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software Development :: Libraries :: Python Modules

Evidence: Sanic_Cors-2.2.0-py2.py3-none-any.whl

Tags

Capabilities
sanic cors extensioncross-origin requests saniccors middleware sanicenable cors sanic appcross-origin ajax sanicsanic cors decorator
Topics
corsabandoned-projectsanic-framework

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “sanic cors extension”

  • Sanic-CorsSanic-CORS is a Sanic extension that adds Cross-Origin Resource…
  • sanic-extSanic Extensions adds OpenAPI documentation, request validation,…
  • quart-corsQuart-CORS adds Cross-Origin Resource Sharing (CORS) support to Quart…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also flask-cors · sanic-ext · invenio-rest · quart-cors · django-cors-headers · aiohttp-cors · fastapi-cors · sanic-routing · cherrypy-cors · sanic