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.1.1.tar.gz
(676.1 kB
view hashes)
Built Distribution
Close
Hashes for streamlit-url-fragment-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50579fd1972097c37e637d8bfe34dfa68d91fa0a61add20dbbffde8bbd8f1046 |
|
MD5 | b189a750dda20bc9fa489dc13a9207cb |
|
BLAKE2b-256 | 99e6eb7fc4b1f46b96dc55e585ff0f708eafbe46c694b1e8e625cddcce494af6 |
Close
Hashes for streamlit_url_fragment-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c7fc4f22f23da14c5c87f8463c8f471af6f4ae1b28a7acfdb5a069e2c884384 |
|
MD5 | a428b11d1931b4a14396a095a15d97e8 |
|
BLAKE2b-256 | 266f1692c956fb1a7d6f500ff958c85ea1dc103440eb4d8ca1c15fbaef0d9b50 |