Skip to content

skarnu/confstruct

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Confstruct

Modern library to configure your Python apps based on msgspec

uv Ruff Python versions Project version

Usage

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: 12345678

License

Confstruct is MIT licensed

About

Modern library to configure your Python apps based on msgspec

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages