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.

Source Distribution

Flask-Mux-0.0.3.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

Flask_Mux-0.0.3-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file Flask-Mux-0.0.3.tar.gz.

File metadata

  • Download URL: Flask-Mux-0.0.3.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for Flask-Mux-0.0.3.tar.gz
Algorithm Hash digest
SHA256 cde9a9a23cc12e8df7df1ee193caf59ecb311ae6fcb0b88c28080d9760c79c76
MD5 4a04fa7d933bc9b94485d596dc3bf043
BLAKE2b-256 116524e46f3b33b6b5c92b00250beadb767538dc351bdb718e24e7d5d04f7e95

See more details on using hashes here.

File details

Details for the file Flask_Mux-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: Flask_Mux-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.3.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

File hashes

Hashes for Flask_Mux-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4b69bb31da1923ca2d2e6f0982bad3be254c9d6af45edb5865e26afb90a14d32
MD5 3febf7e64811544cb929bafc24a5d455
BLAKE2b-256 5a0629b8ed1a17e8e972c80172638f8c2cfc8ba27ec7bb045a061bed5eb2336a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page