Skip to content

An experimental version of Streamlit Multi-Page Apps

License

Notifications You must be signed in to change notification settings

arnaudmiribel/st_pages

 
 

Repository files navigation

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:"),
    ]
)

About

An experimental version of Streamlit Multi-Page Apps

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%