Last active
November 15, 2021 02:47
-
-
Save cassioeskelsen/d03a6a059a11f086dce1db83b9b0fdf5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pydantic import BaseSettings, Field | |
class CommonSettings(BaseSettings): | |
environment: str = Field(default='homolog') | |
http_port: int | |
class Config: | |
env_file_encoding = 'utf-8' | |
fields = { | |
'environment': { | |
'env': 'environment' | |
}, | |
'http_port': { | |
'env': 'http_port' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment