Flask-Reggie
Enable Regex Routes within Flask
Installation
pip install flask-reggie
Configuration
To enable regex routes within your application
from flask import Flask
from flask_reggie import Reggie
app = Flask(__name__)
Reggie(app)
or
from flask import Flask
from flask_reggie import Reggie
reggie = Reggie()
def create_app():
app = Flask(__name__)
reggie.init_app(app)
return app
Usage
If we were looking to have a UUID supplied as a view argument, we would follow this pattern
@app.route('/<regex("[0-9a-f]{32}"):uuid>')
def example(uuid):
return uuid
As you can see, we are able to supply a regular expression, and have it passed as a view argument.
Simple.
History
0.0.2 (6/7/2013)
Added requirements.txt for Testing Packages.
Included License.
PEP8 Compliance (and Docstrings).
setup.py now pushes package data.
Updated TravisCI (Comprehensive tests of multiple versions of Flask).
0.0.1 (20/12/2012)
Conception
Initial Commit of Package to GitHub.
Metadata
Release files for Flask-Reggie 0.0.2
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 | Actions |
|---|---|---|---|---|
| Flask-Reggie-0.0.2.tar.gz | 2.9 kB | Without provenance | Details for Flask-Reggie-0.0.2.tar.gz |
Release files / Flask-Reggie-0.0.2.tar.gz
| Download URL | Flask-Reggie-0.0.2.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
79fd1d19f37f00e16e261a82e5b8da87743eb21f5c96ccd11a02a246a2555eed
|
|
BLAKE2b-256 checksum How to use checksums |
9ce9da612754a387a4350bf6ae255a9c637979ef84051d89ad65cb63ceaa1d8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for Flask-Reggie 0.0.2
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.