Skip to content

Instantly share code, notes, and snippets.

@cassioeskelsen
Last active November 15, 2021 02:47
Show Gist options
  • Save cassioeskelsen/d03a6a059a11f086dce1db83b9b0fdf5 to your computer and use it in GitHub Desktop.
Save cassioeskelsen/d03a6a059a11f086dce1db83b9b0fdf5 to your computer and use it in GitHub Desktop.
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