Skip to main content

An experimental version of Streamlit Multi-Page Apps

Project description

Streamlit-Pages

Build Status

Python Versions

Streamlit versions

License

Black

Streamlit App

Installation

pip install st-pages

Why st-pages?

Streamlit has native support for multi-page apps where page filenames are the source of truth for page settings.

But, you might want to be able to change the names, icons or order of your pages without having to rename the files themselves.

This is an experimental package to try out how page-management might work if you could name the pages whatever you wanted, and could manage which pages are visible, and how they appear in the sidebar, via a setup function.

This enables you to set page name, icon and order independently of file name/path, while still retaining the same sidebar & url behavior of current streamlit multi-page apps.

How to use

from st_pages import Page, show_pages, add_page_title

# Optional -- adds the title and icon to the current page
add_page_title()

# Specify what pages should be shown in the sidebar, and what their titles and icons
# should be
show_pages(
    [
        Page("streamlit_app.py", "Home", "🏠"),
        Page("other_pages/page2", "Page 2", ":books:"),
    ]
)

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

st_pages-0.1.2.tar.gz (4.5 kB view hashes)

Uploaded Source

Built Distribution

st_pages-0.1.2-py3-none-any.whl (4.3 kB view hashes)

Uploaded Python 3

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