Skip to main content

Get the URL fragment (part after #) from Streamlit

Project description

Streamlit URL fragment

Get the URL fragment (the part of URL after #) in your Streamlit script:

import streamlit as st
from streamlit_url_fragment import get_fragment

current_value = get_fragment()
st.write("Current value: {!r}".format(get_fragment()))

Warning: the first value you'll get will be a None - that means the component is still loading. You can wait for the correct value with if current_value is None: st.stop().

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

streamlit-url-fragment-0.2.1.tar.gz (676.1 kB view hashes)

Uploaded Source

Built Distribution

streamlit_url_fragment-0.2.1-py3-none-any.whl (686.8 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