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:
1 parent
8b89e4a993
commit
d93d039406
7 files changed
+109
No files matched your search
@@ -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()
|
||||
Reference in new issue
Block a user