Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rhyselsmore/flask-reggie
Regex Converter for Flask URL Routes
https://github.com/rhyselsmore/flask-reggie
Last synced: 3 months ago
JSON representation
Regex Converter for Flask URL Routes
- Host: GitHub
- URL: https://github.com/rhyselsmore/flask-reggie
- Owner: rhyselsmore
- License: other
- Created: 2012-12-20T13:16:23.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-07-08T02:03:07.000Z (over 11 years ago)
- Last Synced: 2024-10-13T09:59:38.561Z (3 months ago)
- Language: Python
- Size: 148 KB
- Stars: 48
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: HISTORY.rst
- License: LICENSE
Awesome Lists containing this project
- awesome-flask - Flask-Reggie - Regex Converter for Flask URL Routes (Utils)
- awesome-flask - Flask-Reggie - Regex Converter for Flask URL Routes (Utils)
- awesome-flask - Flask-Reggie - Regex Converter for Flask URL Routes (Utils)
README
Flask-Reggie
============.. image:: https://travis-ci.org/rhyselsmore/flask-reggie.png?branch=master
:target: https://travis-ci.org/rhyselsmore/flask-reggie.. image:: https://pypip.in/d/Flask-Reggie/badge.png
:target: https://crate.io/packages/Flask-Reggie/Enable Regex Routes within Flask
Installation
------------.. code-block:: bash
pip install flask-reggie
Configuration
-------------To enable regex routes within your application
.. code-block:: python
from flask import Flask
from flask_reggie import Reggieapp = Flask(__name__)
Reggie(app)or
.. code-block:: python
from flask import Flask
from flask_reggie import Reggiereggie = Reggie()
def create_app():
app = Flask(__name__)
reggie.init_app(app)
return appUsage
-----If we were looking to have a UUID supplied as a view argument, we would follow this pattern
.. code-block:: python
@app.route('/')
def example(uuid):
return uuidAs you can see, we are able to supply a regular expression, and have it passed as a view argument.
Simple.
Contribute
----------#. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug. There is a Contributor Friendly tag for issues that should be ideal for people who are not very familiar with the codebase yet.
#. Fork `the repository`_ on Github to start making your changes to the **master** branch (or branch off of it).
#. Write a test which shows that the bug was fixed or that the feature works as expected.
#. Send a pull request and bug the maintainer until it gets merged and published... _`the repository`: http://github.com/rhyselsmore/flask-reggie