Skip to content
This repository was archived by the owner on Jan 30, 2026. It is now read-only.

Latest commit

 

History

History
39 lines (29 loc) · 2.24 KB

File metadata and controls

39 lines (29 loc) · 2.24 KB

Confstruct

Modern library to configure your Python apps based on msgspec

Caution

The project is archived. I recommend using betterconf instead.

uv Ruff Python versions Project version

Usage

pip install "confstruct @ https://github.com/univied/confstruct.git"
import msgspec
from confstruct import load
from confstruct.providers 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: 12345678

License

Confstruct is MIT licensed