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

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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file streamlit-javascript-0.1.4.tar.gz.

File metadata

  • Download URL: streamlit-javascript-0.1.4.tar.gz
  • Upload date:
  • Size: 512.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for streamlit-javascript-0.1.4.tar.gz
Algorithm Hash digest
SHA256 6183595a5fdd6c2c9baadcf974da342e4ab04bbb404ebc069a2d5441ab03ed50
MD5 e74087f18732804a18c62c3369585351
BLAKE2b-256 49322eb523a2e22076739bbe0b8f4dc640bbd74853b6152cbb7d0ad946d0bac0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: streamlit_javascript-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 518.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for streamlit_javascript-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a03dc016604eb97bf3f232e5a98aac0c08583bf5cf81657a86fabac74bc13245
MD5 ab62dbf870095a84c64406e7e38d635c
BLAKE2b-256 a6cfd3c805c5c70ddfd6913ac9ba554735bb04feb73743319ae3ed19a888b2af

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.5

2 files

This release

0.1.4 This release

2 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