skillfed

quart-cors

A Quart extension to provide Cross Origin Resource Sharing, access control, support

quart-cors v0.8.0 699.0K downloads/30d#5,296 on PyPI
Permissive license MIT DORMANT released

What it is and what it does

Quart-CORS is an extension that handles Cross-Origin Resource Sharing (CORS) for Quart async web applications. It solves the problem of browser Same-Origin Policy restrictions by adding the necessary access-control headers that tell browsers which cross-origin requests are permitted. The extension works by intercepting HTTP requests and WebSocket connections, adding headers that specify allowed origins, methods, credentials, and other CORS parameters.

You can apply CORS globally to an entire application or blueprint, or selectively to individual routes and WebSocket handlers using decorators. Configuration can be set per-route or via application settings, with support for specific origins, wildcards, regex patterns, and credential sharing rules. The package handles both simple GET requests (which return CORS headers in the response) and complex requests (which require preflight OPTIONS requests).

Use it for:

  • Enable a frontend hosted on one domain to make API calls to a Quart backend on a different domain.
  • Allow browser-based clients to access WebSocket endpoints from specific approved origins.
  • Restrict cross-origin requests to a whitelist of domains using regex patterns for subdomains.
  • Configure different CORS policies for different API routes (e.g., public endpoints vs. authenticated endpoints).
  • Exempt specific WebSocket handlers from CORS checks using the cors_exempt decorator.

Worth the install?

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

Quart-CORS adds Cross-Origin Resource Sharing (CORS) support to Quart applications, enabling controlled cross-origin requests in browsers by managing access-control headers for HTTP routes and WebSockets.

Yes, if you are building a Quart application that needs CORS support and can tolerate dormant maintenance. The package is straightforward to install and use, carries no security vulnerabilities, and has permissive licensing. However, the 595-day gap since the last release and Alpha status mean you should verify compatibility with your Quart version and be prepared to maintain a fork if critical issues arise.

Install

quart-cors on PyPI

pip

pip install quart-cors

uv

uv add quart-cors

poetry

poetry add quart-cors

Installing quart-cors

Before you install

Installation is straightforward with low friction—a pure-Python wheel with only two runtime dependencies (quart and typing_extensions). The package is dormant (595 days since last release) but carries an Alpha development status; stability is not guaranteed and maintenance is inactive.

License in practice

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

Quickstart

pip install quart-cors

from quart_cors import cors
from quart import Quart

app = Quart(__name__)
app = cors(app, allow_origin="https://example.com")

Requires Quart application already set up; CORS applies only to browser-initiated requests, not non-browser clients.

Verify before relying

  • Current compatibility with latest Quart versions beyond what the fact sheet indicates.
  • Whether dormant status (595 days since release) reflects active maintenance or abandonment.
  • Real-world performance and security implications of the preflight request handling.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 2 — quart, typing_extensions
Maintenance dormant — 595 days since the last release
First released
Downloads 698,988/month — #5,296 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: quart_cors-0.8.0-py3-none-any.whl

Development Status :: 3 - AlphaEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software Development :: Libraries :: Python Modules

Tags

CORS support for Quartcross-origin resource sharingbrowser access control headersQuart CORS middlewarecross-origin HTTP requestsCORS preflight handlingorigin policy control
corsasync-webaccess-control

More Python Modules packages