streamlit cache clear
Streamlitアプリがディスク上に保存したキャッシュ(@st.cache_data や @st.cache_resource などで作成されたもの)をすべて削除します。キャッシュが古くなった場合や、動作がおかしいときに使用します。
$ streamlit cache clear
Disk cache cleared.
streamlit config show
現在のStreamlit設定オプション(デフォルト値や config.toml で上書きした値を含む)をすべて表示します。どの設定が有効になっているかを確認するのに便利です。
$ streamlit config show
# This file is generated automatically.
# ... (中略) ...
[global]
# ... (中略) ...
shareGMenu = true # Show "Share" menu.
[logger]
# ... (中略) ...
level = "info" # Level of logging: 'error', 'warning', 'info', or 'debug'.
[client]
# ... (中略) ...
showErrorDetails = true # Show details in error messages.
[server]
# ... (中略) ...
port = 8501 # Port to run the server on.
# ... (以下、多くの設定が続く) ...
streamlit docs
デフォルトのWebブラウザで、Streamlitの公式ドキュメントページ (https://docs.streamlit.io) を開きます。
$ streamlit docs
# (コマンド実行後、自動的にブラウザが起動し、ドキュメントページが開きます)
# (ターミナル自体には特別な出力はありません)
streamlit hello
Streamlitの基本的な使い方を示すデモアプリを実行します。インストールが正しくできているかの確認や、簡単なコード例を見るのに役立ちます。
$ streamlit hello
You can now view your Streamlit app in your browser.
Local URL: http://localhost:8501
Network URL: http://192.168.X.X:8501 (X.Xは環境により異なります)
# (ブラウザが起動し、デモアプリが表示されます)
streamlit help
利用可能なStreamlitコマンドの一覧と、それぞれの簡単な説明を表示します。
$ streamlit help
Usage: streamlit [OPTIONS] COMMAND [ARGS]...
Streamlit.
Options:
--help Show this message and exit.
Commands:
cache Manage the Streamlit cache.
config Manage Streamlit configuration.
docs Open Streamlit documentation.
hello Run the Streamlit 'Hello' app.
init Create files for a new Streamlit app.
run Run a Streamlit app.
version Show the Streamlit version.
... (その他のコマンド) ...
streamlit init
新しいStreamlitアプリプロジェクトの基本的なファイル(streamlit_app.py, .streamlit/config.toml, README.md など)を現在のディレクトリに生成します。
$ streamlit init
Welcome to Streamlit!
Let's create a new app in '.' (current directory):
‣ README.md
‣ .streamlit/config.toml
‣ streamlit_app.py
Want to create these files? [Y/n] Y
Files created!
streamlit run
指定したPythonスクリプト(例: app.py)をStreamlitアプリとして実行します。ローカルサーバーが起動し、ブラウザでアプリにアクセスできるようになります。
$ streamlit run my_app.py
You can now view your Streamlit app in your browser.
Local URL: http://localhost:8501
Network URL: http://192.168.X.X:8501
# (ブラウザが起動し、my_app.pyの内容に基づいたアプリが表示されます)
streamlit version
現在インストールされているStreamlitのバージョン番号を表示します。
$ streamlit version
Streamlit, version 1.50.0
