Skip to main content

component to run javascript code in streamlit application

Project description

Streamlit javascript execution

GitHub PyPI


pip install streamlit-javascript

Getting started

from streamlit_javascript import st_javascript

st.subheader("Javascript API call")

return_value = st_javascript("""await fetch("").then(function(response) {
    return response.json();
}) """)

st.markdown(f"Return value was: {return_value}")
print(f"Return value was: {return_value}")


example image

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-javascript-0.1.5.tar.gz (512.4 kB view hashes)

Uploaded source

Built Distribution

streamlit_javascript-0.1.5-py3-none-any.whl (518.4 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page