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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file st_pages-0.1.2.tar.gz.

File metadata

  • Download URL: st_pages-0.1.2.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.2 Linux/5.15.0-1022-azure

File hashes

Hashes for st_pages-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bbd4e78d14ffacb64075cc457d3516022e560033207171b7ae19093d1c4f44d1
MD5 7706aa69c9431812618d15b027a3727b
BLAKE2b-256 bd23686deb6981a8c8d0684f94ca02735bf015d89f296042ed47a0626b7bd4ab

See more details on using hashes here.

Provenance

File details

Details for the file st_pages-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: st_pages-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.2 Linux/5.15.0-1022-azure

File hashes

Hashes for st_pages-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 972c377acddc72eabe1595f8fab3e77cfbf725aaae78eb3f4f7ec0584efd7b0b
MD5 1a099263f10bdd69064072e848fd1fd4
BLAKE2b-256 03660964317c61787f0c417cd47b8f525cfa96b486c8172918b57529aa4f4ed6

See more details on using hashes here.

Provenance

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