Skip to main content

Minimal routing extension for Flask

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Flask-Mux, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size Flask_Mux-0.0.3-py3-none-any.whl (7.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size Flask-Mux-0.0.3.tar.gz (6.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page