Flask-CORS
Flask-CORS is a simple extension to Flask allowing you to support cross origin resource sharing (CORS) using a simple decorator.
Installation
Install the extension with using pip, or easy_install.
$ pip install flask-cors
Usage
This extension exposes a simple decorator to decorate flask routes with. Simply add @cross_origin() below a call to Flask’s @app.route(..) incanation to accept the default options and allow CORS on a given route.
Simple Usage
@app.route("/")
@cross_origin() # allow all origins all methods.
def helloWorld():
return "Hello, cross-origin-world!"
For a full list of options, please see the full documentation
Tests
A simple set of tests is included in test.py. To run, install nose, and simply invoke nosetests or run python test.py to exercise the tests.
Contributing
Questions, comments or improvements? Please create an issue on Github, tweet at me or send me an email.
Metadata
Release files for flask-cors 1.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| Flask-Cors-1.1.3.tar.gz | 8.8 kB | Without provenance | Details |
Release files / Flask-Cors-1.1.3.tar.gz
| Download URL | Flask-Cors-1.1.3.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bffa7d4b8d445bf0001ebefe5a03e84ea060cee9379dd29e68244615e8e8f8f2
|
|
BLAKE2b-256 checksum How to use checksums |
55a1a5c56ec32983438aff76a1624cde02753d471de1a9380f6eb3737c496942
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for flask-cors 1.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.