Flask-Mux

Minimal routing extension for Flask


Keywords
flask
License
MIT
Install
pip install Flask-Mux==0.0.3

Documentation

Flask-Mux

Build Status Downloads Latest Version Supported Python versions License

Flask-Mux is a lightweight Flask extension that provides a routing system similar to that of Express.js. It basically wraps Flask's url route registrations API to add more flexibility.

Installing

Install using pip:

$ pip install Flask-Mux

A Simple Example

from flask import Flask
from flask_mux import Mux, Router

app = Flask(__name__)
mux = Mux(app)

def home():
    return 'home'

def about():
    return 'about'

index_router = Router()
index_router.get('/', home)
index_router.get('/about', about)

mux.use('/', index_router)

User's Guide

You'll find the user guide and all documentation here

Links