Might be able to use pydantic if help/follow this pr https://github.com/pydantic/pydantic-settings/pull/140 https://pypi.org/project/keyring/