スキル一覧に戻る
streamlit

setting-up-streamlit-environment

by streamlit

A collection of agent skills for development of Streamlit apps.

6🍴 1📅 2026年1月23日
GitHubで見るManusで実行

SKILL.md


name: setting-up-streamlit-environment description: Setting up Python environments for Streamlit apps. Use when creating a new project or managing dependencies. Covers uv for dependency management and running apps. license: Apache-2.0

Streamlit environment

Use whatever dependency management the project already has (pip, poetry, conda, etc.). If starting fresh and uv is available, it's a good default—fast, reliable, and creates isolated environments automatically.

If uv is not installed, ask the user before installing it.

Using uv

If uv is available, here's how to set up a Streamlit project.

Quick start (venv only)

For simple apps, just create a virtual environment:

uv venv
source .venv/bin/activate  # or .venv\Scripts\activate on Windows
uv pip install streamlit

Run with:

streamlit run streamlit_app.py

Full project setup

For larger projects or when you need reproducible builds:

uv init my-streamlit-app
cd my-streamlit-app
uv add streamlit

This creates:

  • pyproject.toml with dependencies
  • uv.lock for reproducible builds
  • .venv/ virtual environment

Run with:

uv run streamlit run streamlit_app.py

With options

Avoid setting options unless you have a specific reason:

streamlit run streamlit_app.py --server.headless true  # Only for automated/CI environments

Add dependencies

# With venv approach
uv pip install plotly snowflake-connector-python

# With full project (uv init)
uv add plotly snowflake-connector-python

Project structure

Keep it simple. For most apps:

my-streamlit-app/
├── .venv/
└── streamlit_app.py

Only add more when needed:

  • app_pages/ → Only for multi-page apps
  • .streamlit/config.toml → Only if customizing theme or settings
  • .streamlit/secrets.toml → Only if using secrets (add to .gitignore)
  • pyproject.toml → Only if using uv init for reproducible builds

Convention

Name your main file streamlit_app.py for consistency. This is what Streamlit expects by default.

What goes in the main module:

  • When using navigation: it's a router that defines pages and runs them
  • When there's no navigation: it's the home page with your main content

pyproject.toml Example

[project]
name = "my-streamlit-app"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = [
    "streamlit>=1.40.0",
    "plotly>=5.0.0",
    "snowflake-connector-python>=3.0.0",
]

[tool.uv]
dev-dependencies = [
    "pytest>=8.0.0",
]

References

スコア

総合スコア

55/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

0/5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です