19 lines
No EOL
538 B
Python
19 lines
No EOL
538 B
Python
from pydantic_settings import SettingsConfigDict, BaseSettings
|
|
|
|
class Configuration(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env")
|
|
|
|
inverter_host: str #Inverter IP
|
|
inverter_unique_tag: str #Custom unique inverter name
|
|
mongodb_host: str #MongoDB Host
|
|
mongodb_port: str #MongoDB port
|
|
mongodb_db: str #MongoDB Database
|
|
mongodb_user: str #MongoDB username
|
|
mongodb_pass: str #MongoDB password
|
|
|
|
|
|
cfg = Configuration()
|
|
|
|
|
|
def get_config() -> Configuration:
|
|
return Configuration() |