← 返回命令列表

Linux command

streamlit 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Run Streamlit app

streamlit run [app.py]

Run with specific port

streamlit run [app.py] --server.port [8501]

Run with arguments

streamlit run [app.py] -- [--arg1] [--arg2]

Show configuration

streamlit config show

Create hello app

streamlit hello

Clear cache

streamlit cache clear

Show version

streamlit version

说明

streamlit creates web applications from Python scripts. Data apps, dashboards, and ML demos are built without web development knowledge. Apps are Python scripts using Streamlit's API. Widgets like sliders, buttons, and text inputs are added with single function calls. Hot reload automatically updates the app when code changes. The development workflow is fast and interactive. Caching decorators prevent recomputation of expensive operations. Data loads and model inference are cached across reruns. Deployment options include Streamlit Community Cloud, which hosts apps from GitHub for free. Self-hosting is also supported. Components extend functionality. Custom widgets, visualizations, and integrations are available from the ecosystem.

参数

run _FILE_
Run Streamlit app.
hello
Run demo app.
config show
Show configuration.
cache clear
Clear cache.
version
Show version.
--server.port _PORT_
Server port.
--server.address _ADDR_
Server address.
--server.headless _BOOL_
Run without browser.
--browser.serverAddress _ADDR_
Browser server address.
--theme.base _THEME_
Theme (light/dark).
--global.developmentMode _BOOL_
Development mode.

FAQ

What is the streamlit command used for?

streamlit creates web applications from Python scripts. Data apps, dashboards, and ML demos are built without web development knowledge. Apps are Python scripts using Streamlit's API. Widgets like sliders, buttons, and text inputs are added with single function calls. Hot reload automatically updates the app when code changes. The development workflow is fast and interactive. Caching decorators prevent recomputation of expensive operations. Data loads and model inference are cached across reruns. Deployment options include Streamlit Community Cloud, which hosts apps from GitHub for free. Self-hosting is also supported. Components extend functionality. Custom widgets, visualizations, and integrations are available from the ecosystem.

How do I run a basic streamlit example?

Run `streamlit run [app.py]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does run _FILE_ do in streamlit?

Run Streamlit app.