feat: added robot_pi_service.py, settings.py; devops: added Makefile for run project; docs: added for run project with Makefile

This commit is contained in:
Arduinum628
2025-06-02 12:19:02 +03:00
parent 8b89e4a993
commit d93d039406
7 changed files with 109 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
from pydantic_settings import BaseSettings, SettingsConfigDict
class ModelConfig(BaseSettings):
"""Модель конфига"""
model_config = SettingsConfigDict(
env_file = '.env',
env_file_encoding='utf-8',
extra='ignore'
)
class CommandsRobot(ModelConfig):
"""Класс с командами для робота"""
forward: str
backward: str
left: str
right: str
class Settings(ModelConfig):
"""Класс для данных конфига"""
websocket_host: str
websocket_port: int
commands_robot: CommandsRobot = CommandsRobot()
settings = Settings()