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.0.tar.gz
(340.1 kB
view hashes)
Built Distribution
Close
Hashes for streamlit-url-fragment-0.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85428cf16d315fd8641de95f8d962eb491559aecb2ba3d4086cc294c9155afed |
|
MD5 | f04717c8d72f3f007b288acf586f18d8 |
|
BLAKE2b-256 | 603fa312d48ed8fb516d4d7e2900c487d812b52bad6fb65ae571d232abb38dcb |
Close
Hashes for streamlit_url_fragment-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05e8b1dcdf44dbf62f13e49874a81f576246104817d797be860fceda96a8c97a |
|
MD5 | fdf4737150b6e0187c67f959a6c9460d |
|
BLAKE2b-256 | d26ad817f3ba3ddecd78feaa60e01bfa7399d0e403ae72c6165c862e2ad3b545 |