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 details)
Built Distribution
File details
Details for the file streamlit-url-fragment-0.1.0.tar.gz
.
File metadata
- Download URL: streamlit-url-fragment-0.1.0.tar.gz
- Upload date:
- Size: 340.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.9.7 Linux/5.13.0-23-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85428cf16d315fd8641de95f8d962eb491559aecb2ba3d4086cc294c9155afed |
|
MD5 | f04717c8d72f3f007b288acf586f18d8 |
|
BLAKE2b-256 | 603fa312d48ed8fb516d4d7e2900c487d812b52bad6fb65ae571d232abb38dcb |
File details
Details for the file streamlit_url_fragment-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: streamlit_url_fragment-0.1.0-py3-none-any.whl
- Upload date:
- Size: 345.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.12 CPython/3.9.7 Linux/5.13.0-23-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05e8b1dcdf44dbf62f13e49874a81f576246104817d797be860fceda96a8c97a |
|
MD5 | fdf4737150b6e0187c67f959a6c9460d |
|
BLAKE2b-256 | d26ad817f3ba3ddecd78feaa60e01bfa7399d0e403ae72c6165c862e2ad3b545 |