Clone
1
API文档
admin edited this page 2026-01-16 02:52:51 +00:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

test_good

一个基于 Streamlit 的示例应用,展示各种数据可视化和交互功能。

功能特性

  • 📊 多种图表类型matplotlib、plotly
  • 📁 数据操作和处理
  • 📝 交互式表单
  • 🎨 可定制主题
  • 📱 响应式布局

技术栈

  • Python 3.14+
  • Streamlit 1.52.1
  • Matplotlib 3.10.8
  • Plotly 6.5.0
  • Pandas 2.3.3
  • NumPy 2.3.5

快速开始

使用 uv推荐

# 安装依赖
uv sync

# 运行应用
uv run streamlit run app.py

使用传统方式

# 创建虚拟环境
python -m venv .venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate

# 安装依赖
pip install -r requirements.txt

# 运行应用
streamlit run app.py

项目结构

test_good/
├── app.py              # 主应用文件
├── main.py             # 入口文件
├── pyproject.toml      # 项目配置
├── justfile           # 任务自动化
├── Dockerfile         # Docker 配置
├── .dockerignore      # Docker 忽略文件
└── README.md          # 项目文档

使用 just

项目使用 justfile 进行任务管理:

# 查看所有可用命令
just --list

# 运行应用
just run

# 代码格式化
just fmt

# 代码检查
just lint

Docker 部署

# 构建镜像
docker build -t test-good .

# 运行容器
docker run -p 8501:8501 test-good

开发指南

  1. 代码风格遵循 PEP 8
  2. 使用 ruff 进行代码格式化
  3. 提交信息遵循 Conventional Commits 规范

许可证

MIT License