Modern library to configure your Python apps based on msgspec
pip install "confstruct @ https://github.com/skarnu/confstruct.git"import msgspec
from confstruct import load
from confstruct.provider import JSONProvider
from confstruct.types import SecretStr
class Config(msgspec.Struct):
password: SecretStr
config = load(Config, provider=JSONProvider({"password": "12345678"}))
print(config.password) # Output: ********
print(config.password.value) # Output: 12345678Confstruct is MIT licensed
