Skip to main content

component to run javascript code in streamlit application

Project description

Streamlit javascript execution

GitHub PyPI

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

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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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

Hashes for streamlit-javascript-0.1.5.tar.gz
Algorithm Hash digest
SHA256 9da5176522a0acf2c39d3b0bec9f856fdd8ea3c70bb1066841a546ab1348ae1d
MD5 95f88f142427e29de9783879ccaa3222
BLAKE2b-256 a569723ebc7a58057b1e6f54d0c23c86488054d756e0e470daf4db703fe02a63

See more details on using hashes here.

File details

Details for the file streamlit_javascript-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for streamlit_javascript-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 36ca4d8c46fd5b6526d1a705530472e03cb6e5bb24694330649f21d5c436d280
MD5 fbac04a120f085965f782be124944e44
BLAKE2b-256 87810c9e9e4d2dab97224efe105ba44f47b259f37d8e7673b94f5b5523fe2c8f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page