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:
0
src/mqtt_home/__init__.py
Normal file
0
src/mqtt_home/__init__.py
Normal file
20
src/mqtt_home/config.py
Normal file
20
src/mqtt_home/config.py
Normal 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()
|
||||
5
src/mqtt_home/database.py
Normal file
5
src/mqtt_home/database.py
Normal file
@@ -0,0 +1,5 @@
|
||||
from sqlalchemy.orm import DeclarativeBase
|
||||
|
||||
|
||||
class Base(DeclarativeBase):
|
||||
pass
|
||||
Reference in New Issue
Block a user