mirror of
https://github.com/rnvm9wjdtj-bot/myaps_api.git
synced 2026-06-02 05:54:40 +00:00
d39287b7ee1d57010fa064b6afe144fa1ed954ea
核心逻辑: - removing状态数据能且仅能在推送时删除,禁止自动清理 - 增量推送:根据business_keys删除正式表+缓冲表记录 - 刷新推送:正式表已TRUNCATE,只删除缓冲表记录 修改内容: 1. staging_cleaner.py - sync_to_production新增处理removing状态数据逻辑 - 根据推送模式区分删除策略 - 增量模式:按business_keys构建WHERE条件删除正式表记录 - 刷新模式:直接删除缓冲表记录(正式表已TRUNCATE) 2. staging_routers.py - 同步路由返回统计新增removed字段 - 更新返回消息显示删除数量 数据一致性保证: - 缓冲表removing记录 → 推送时 → 正式表对应记录一并删除 - 确保缓冲表和正式表数据状态一致
MyAPS FastAPI Project
A simple FastAPI project template with a Python virtual environment.
Project Structure
myaps_fastapi/
├── venv/ # Python virtual environment
├── main.py # Main FastAPI application
├── requirements.txt # Project dependencies
├── .gitignore # Git ignore file
└── README.md # Project documentation
Getting Started
1. Activate the Virtual Environment
Windows:
venv\Scripts\activate
macOS/Linux:
source venv/bin/activate
2. Install Dependencies
pip install -r requirements.txt
3. Run the FastAPI Server
uvicorn main:app --reload
4. Access the API
- Open your browser and go to http://127.0.0.1:8000
- Swagger UI documentation: http://127.0.0.1:8000/docs
- ReDoc documentation: http://127.0.0.1:8000/redoc
API Endpoints
GET /- Root endpoint with welcome messageGET /api/info- Project information
Features
- FastAPI framework for high-performance API development
- Automatic interactive API documentation
- Python virtual environment for dependency isolation
- Git integration with proper ignore rules
Requirements
- Python 3.7+","}}}
Description
Languages
JavaScript
59.5%
Python
33.5%
HTML
3.7%
CSS
1.1%
Shell
0.8%
Other
1.4%