I am currently migrating my config setup to Pydantic's base settings. However I need to make a condition in the Settings
class and I am not sure how to go about it:
e.g. I currently have:
class Settings(BaseSetting):
name: str = "name"
age: int = 25
and I want to add some logic like this:
class Settings(BaseSetting):
name: str = "name"
age: int = 25
if age > 50:
old_person: bool = True
What is the best way to go about this in pydantic?