Skip to main content

Easily create navigation for Flask applications.

Project description

Flask-Nav is a Flask-Extension to ease the creation of navigational Elements in Applications. It provides means to Express the Navigational structure and different ways to render these, making it easy to custom tailor it for your application.

A motivating example:

from flask import Flask
from flask_nav import Nav
from flask_nav.elements import *

nav = Nav()

# registers the "top" menubar
nav.register_element('top', Navbar(
    View('Widgits, Inc.', 'index'),
    View('Our Mission', 'about'),
    Subgroup(
        'Products',
        View('Wg240-Series', 'products', product='wg240'),
        View('Wg250-Series', 'products', product='wg250'),
        Separator(),
        Label('Discontinued Products'),
        View('Wg10X', 'products', product='wg10x'),
    ),
    Link('Tech Support', href='http://techsupport.invalid/widgits_inc'),
))


app = Flask(__name__)
# [...] (view definitions)

nav.init_app(app)

You can find a small, runnable example application inside the example folder. To run it, install Flask-Appconfig and execute:

$ flask --app=example dev

The full documentation can be found on PyPI.

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-bootnav-0.7.1.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

flask_bootnav-0.7.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file flask-bootnav-0.7.1.tar.gz.

File metadata

File hashes

Hashes for flask-bootnav-0.7.1.tar.gz
Algorithm Hash digest
SHA256 8acd3ea7e95dbe557729768394c3367b00e779e6a40268f64140c031ab4547da
MD5 8fec4b0239c549809c40326b6ec2eb74
BLAKE2b-256 189379fab065f5449d13a2e501e5cfb28b78c5839262c6d64dccfb13139998a4

See more details on using hashes here.

File details

Details for the file flask_bootnav-0.7.1-py3-none-any.whl.

File metadata

File hashes

Hashes for flask_bootnav-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d932a30ef9a32507934de623dafb7404c4c531f140ac2fd0f11aba1c703838eb
MD5 8e78e999ed576d3648de2c79b3b47e48
BLAKE2b-256 c7dacbe3a0cca8e8f387eab35070df7c1eacd4f58e61b5e5bd65847850720afc

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