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.5.tar.gz
(512.4 kB
view details)
Built Distribution
File details
Details for the file streamlit-javascript-0.1.5.tar.gz
.
File metadata
- Download URL: streamlit-javascript-0.1.5.tar.gz
- Upload date:
- Size: 512.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9da5176522a0acf2c39d3b0bec9f856fdd8ea3c70bb1066841a546ab1348ae1d |
|
MD5 | 95f88f142427e29de9783879ccaa3222 |
|
BLAKE2b-256 | a569723ebc7a58057b1e6f54d0c23c86488054d756e0e470daf4db703fe02a63 |
File details
Details for the file streamlit_javascript-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: streamlit_javascript-0.1.5-py3-none-any.whl
- Upload date:
- Size: 518.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36ca4d8c46fd5b6526d1a705530472e03cb6e5bb24694330649f21d5c436d280 |
|
MD5 | fbac04a120f085965f782be124944e44 |
|
BLAKE2b-256 | 87810c9e9e4d2dab97224efe105ba44f47b259f37d8e7673b94f5b5523fe2c8f |