first commit

This commit is contained in:
Alvaro Garcia Molino
2024-12-17 14:42:57 +01:00
commit c16f0b53e0
4 changed files with 359 additions and 0 deletions

41
core/config.py Normal file
View File

@@ -0,0 +1,41 @@
# -*- coding: utf-8 -*-
"""
class from config file
"""
from pydantic import Field
from pydantic_settings import BaseSettings, SettingsConfigDict
from rich.console import Console
console = Console()
class Settings(BaseSettings):
model_config = SettingsConfigDict()
timezone: str = Field(alias="TIMEZONE", default="Europe/Madrid")
agilent_ip: str = '192.168.2.26'
loop_time: int = 5
# Finot API platform
api_finot: bool = Field(alias="API_FINOT", default=False)
api_finot_loginId: str = "xxxxxxxxxxxxxx-in.eu" # login, please change
api_finot_password: str = "XXXXXXXXXXX" # password, please change
api_finot_refresh_token: str = "RhWyBEf_xxxxxxxxx-xxxxxxxxxxxxxxxxxxxxxxxxxxx" # refresh token
# Agilent channels mapping
agilent_output: dict = {
'TC1':101,
'TC2':102,
'VDC1':103
}
agilent_requests: dict = {
101: 'MEAS:TEMP?',
102: 'MEAS:TEMP?',
103: 'MEAS:VOLT:DC?'
}