Skip to main content

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

Metadata

Release files for streamlit-javascript 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for streamlit-javascript 0.1.5
File Size Uploaded
streamlit-javascript-0.1.5.tar.gz 512.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for streamlit-javascript 0.1.5
File Interpreter ABI Platform
streamlit_javascript-0.1.5-py3-none-any.whl Python 3 none any Details

Total release size: 1.0 MB

Release files / streamlit-javascript-0.1.5.tar.gz

Download URL streamlit-javascript-0.1.5.tar.gz
Size 512.4 kB
Tags Source
SHA-256 checksum
How to use checksums
9da5176522a0acf2c39d3b0bec9f856fdd8ea3c70bb1066841a546ab1348ae1d
BLAKE2b-256 checksum
How to use checksums
a569723ebc7a58057b1e6f54d0c23c86488054d756e0e470daf4db703fe02a63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.2

Release files / streamlit_javascript-0.1.5-py3-none-any.whl

Download URL streamlit_javascript-0.1.5-py3-none-any.whl
Size 518.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
36ca4d8c46fd5b6526d1a705530472e03cb6e5bb24694330649f21d5c436d280
BLAKE2b-256 checksum
How to use checksums
87810c9e9e4d2dab97224efe105ba44f47b259f37d8e7673b94f5b5523fe2c8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.10.2

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page