Quiz⭐毎日コツコツ積み重ね⭐

Streamlitの双方向(bi-directional)コンポーネントの基本的な実装方法 [Q20250613]

streamlit
bi-directional component
Data Application
2025.06.13

Streamlitアプリケーションで、PythonとJavaScript間でデータのやり取りが可能な双方向(bi-directional)コンポーネントを実装する際に、コンポーネントを宣言するために使用する正しい関数はどれでしょうか。以下のPythonコードの ??? に入る適切なStreamlit関数を選んでください。

1 import streamlit as st
2 import streamlit.components.v1 as components
3
4 # ??? を使用して双方向(bi-directional)コンポーネントを宣言する
5 # このコンポーネントはPythonとJavaScript間でデータのやり取りが可能
6 my_component = components.???(
7 "my_component",
8 url="http://localhost:3001"
9 )
10
11 # コンポーネントを使用してデータのやり取り
12 result = my_component(name="Streamlit")
13 st.write("結果:", result)

(select 1 option)

0
X

Sponsored by

スポンサーを募集中。紹介コンテンツもご用意しますので、ご興味あればお問い合わせください。