# your-flask-project **Repository Path**: lyscb/your-flask-project ## Basic Information - **Project Name**: your-flask-project - **Description**: No description available - **Primary Language**: Python - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2025-10-10 - **Last Updated**: 2025-10-12 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 进入项目目录 cd ~/your-flask-project # 创建虚拟环境 python3 -m venv venv # 激活虚拟环境 source venv/bin/activate # 激活后提示符会显示 (venv) # 现在可以安全安装依赖 pip3 install -r requirements.txt # 升级pip(可选) pip3 install --upgrade pip # 确保虚拟环境已激活 source venv/bin/activate # 1. 启动 pigpio 守护进程 sudo pigpiod # 2. 运行应用 python3 run.py raspberry-relay-control/ ├── app/ # 应用主目录 │ ├── __init__.py │ ├── routes/ # 路由模块 │ │ ├── __init__.py │ │ ├── main.py # 主路由 │ │ └── api.py # API路由 │ ├── hardware/ # 硬件控制层 │ │ ├── __init__.py │ │ ├── relay_controller.py │ │ └── gpio_manager.py │ ├── static/ # 静态文件 │ │ ├── css/ │ │ │ └── style.css │ │ ├── js/ │ │ │ └── main.js │ │ └── images/ │ ├── templates/ # 模板文件 │ │ ├── base.html │ │ └── index.html │ └── config.py # 配置管理 ├── tests/ # 测试目录 │ ├── __init__.py │ ├── test_routes.py │ └── test_hardware.py ├── scripts/ # 工具脚本 │ ├── setup_gpio.py │ └── test_relay.py ├── logs/ # 日志目录 ├── requirements.txt ├── run.py # 启动脚本 ├── config.py # 主配置 └── README.md