component to run javascript code in streamlit application
Project description
Streamlit javascript execution
Installation
pip install streamlit-javascript
Getting started
from streamlit_javascript import st_javascript
st.subheader("Javascript API call")
return_value = st_javascript("""await fetch("https://reqres.in/api/products/3").then(function(response) {
return response.json();
}) """)
st.markdown(f"Return value was: {return_value}")
print(f"Return value was: {return_value}")
Demo
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
streamlit-javascript-0.1.4.tar.gz
(512.4 kB
view hashes)
Built Distribution
Close
Hashes for streamlit-javascript-0.1.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6183595a5fdd6c2c9baadcf974da342e4ab04bbb404ebc069a2d5441ab03ed50 |
|
MD5 | e74087f18732804a18c62c3369585351 |
|
BLAKE2b-256 | 49322eb523a2e22076739bbe0b8f4dc640bbd74853b6152cbb7d0ad946d0bac0 |
Close
Hashes for streamlit_javascript-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a03dc016604eb97bf3f232e5a98aac0c08583bf5cf81657a86fabac74bc13245 |
|
MD5 | ab62dbf870095a84c64406e7e38d635c |
|
BLAKE2b-256 | a6cfd3c805c5c70ddfd6913ac9ba554735bb04feb73743319ae3ed19a888b2af |