|
|
пре 1 месец | |
|---|---|---|
| .. | ||
| app | пре 1 месец | |
| scripts | пре 1 месец | |
| test | пре 1 месец | |
| .env.example | пре 1 месец | |
| .gitignore | пре 1 месец | |
| README.md | пре 1 месец | |
| main.py | пре 1 месец | |
Wishing Tree — FastAPI service
Create a .env file (or set environment variables) with your database connection. Do NOT commit secrets.
Recommended (preferred): set a full SQLAlchemy DATABASE_URL environment variable with URL-encoded password.
Example (PowerShell):
$env:DATABASE_URL = "mysql+pymysql://root:%40%40qinys12346..@192.168.1.177:3306/wishing_tree?charset=utf8mb4&serverTimezone=Asia/Shanghai&use_unicode=true&characterEncoding=utf-8"
Or set components separately (Windows PowerShell):
$env:DB_USER = "root" $env:DB_PASS = "@@qinys12346.." $env:DB_HOST = "192.168.1.177" $env:DB_PORT = "3306" $env:DB_NAME = "wishing_tree"
Install runtime dependencies for database access:
pip install sqlalchemy pymysql
pip install python-dotenv
Start the app in development (example):
uvicorn main:app --reload --host 0.0.0.0 --port 8000