feat: project skeleton with config, dependencies, and test setup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
walkpan
2026-03-29 21:26:00 +08:00
parent ce10907619
commit 8b925263a2
8 changed files with 143 additions and 0 deletions

View File

20
src/mqtt_home/config.py Normal file
View File

@@ -0,0 +1,20 @@
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
mqtt_host: str = "localhost"
mqtt_port: int = 1883
mqtt_username: str = ""
mqtt_password: str = ""
emqx_api_url: str = "http://localhost:18083/api/v5"
emqx_api_key: str = ""
emqx_api_secret: str = ""
database_url: str = "sqlite+aiosqlite:///./data/mqtt_home.db"
web_host: str = "0.0.0.0"
web_port: int = 8000
model_config = {"env_file": ".env", "env_prefix": ""}
def get_settings() -> Settings:
return Settings()

View File

@@ -0,0 +1,5 @@
from sqlalchemy.orm import DeclarativeBase
class Base(DeclarativeBase):
pass