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.0.tar.gz
(676.0 kB
view hashes)
Built Distribution
Close
Hashes for streamlit-url-fragment-0.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cec868f6919b7c8d79ffae45b06167afeab02d5f44ae5d7915f9813412ed7d3c |
|
MD5 | 160d22d8462ba604d22ea4c974e2078c |
|
BLAKE2b-256 | 5f31eb1e8da1702c6ad32b10b05972c8d17c814796b0f9d7da58d56a998dc633 |
Close
Hashes for streamlit_url_fragment-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef34ee66639112e26ccee9618921445d83caf0a98158703b0c550ef61f2aaade |
|
MD5 | c66c8d08c859fc7eb39fca5c1ca33bba |
|
BLAKE2b-256 | ca23f7122399d046062165a6189a825004c501b2d8ad0574e2d2e65e4aaec10e |