streamlit
https://streamlit.io/
参考:
streamlitの仕組み調査 - Qiita
streamlit は Python(tornade)+React | js(typescript)で実装されています。
小規模なユーザが頻繁にデータアクセスするユースケースには向いているアーキテクチャと言えるかもしれません。
threadingが使われており、これはPythonのGIL制約によってCPU boundな処理に対しては効果を発揮しません
グラフを画面上、横に並べたい。縦はそのままst.xxx_chart()やst.subheader()を並べるだけ。
code: st.columns.py
col1, col2, col3 = st.columns(3,1,2)
with col1:
st.line_chart(stock.iloc:, 0)
with col2:
st.line_chart(stock.iloc:, 1)
with col3:
st.line_chart(stock.iloc:, 2)
グラフの見た目を修正したい...みたいなものはない。
St.line_chart - Using Streamlit - Streamlit
https://docs.streamlit.io/library/api-reference/charts
pyplot, altair, vega_lite, plotly, bokeh pydeck, graphviz とpythonのvisualization libraryの呼び出し?がmethodに入ってる
cheatsheet: Cheat sheet - Streamlit Docsを列挙しておけばよい?
st.text, st.markdown, st.latex, st.write, st.title, st.heaer, st.subheader, st.code
st.dateframe, st.table, st.json. st.metric
st.image, st.audio, st.video
interactive widgetとして
button, radio, checkbox, selectobox, slider,, select_slider, text_area, time_input, file_uploader, camera_input,
audio inputが無い?
custom componentで実現した例
Record sound from the user's microphone with streamlit - Using Streamlit - Streamlit
wb speech apiがブラウザに実験的機能であるので
https://developer.mozilla.org/ja/docs/Web/API/Web_Speech_API