first commit

This commit is contained in:
jeremygan2021
2025-11-16 17:21:25 +08:00
commit a2682dc040
46 changed files with 5976 additions and 0 deletions

35
config.py Normal file
View File

@@ -0,0 +1,35 @@
from pydantic_settings import BaseSettings
from typing import Optional
class Settings(BaseSettings):
# 数据库配置
database_url: str = "postgresql://luna:123luna@121.43.104.161:6432/luna_ink"
# MQTT配置
mqtt_broker_host: str = "localhost"
mqtt_broker_port: int = 1883
mqtt_username: Optional[str] = None
mqtt_password: Optional[str] = None
# 应用配置
app_name: str = "墨水屏桌面屏幕系统"
debug: bool = False
# 文件存储配置
static_dir: str = "static"
upload_dir: str = "static/uploads"
processed_dir: str = "static/processed"
# 墨水屏配置
ink_width: int = 400
ink_height: int = 300
# 安全配置
secret_key: str = "your-secret-key-change-in-production"
algorithm: str = "HS256"
access_token_expire_minutes: int = 30
class Config:
env_file = ".env"
settings = Settings()