Closed mthuurne closed 1 year ago
The format_template() function can take either a dataclass or a dataclass instance as its argument. If the Binder class could do the same, we could make format_template() a method on Binder.
format_template()
Binder
Additionally, this would allow for layered configurations:
system_config = Binder(Config).parse_toml(system_config_file) config = Binder(system_config).parse_toml(user_config_file)
The
format_template()
function can take either a dataclass or a dataclass instance as its argument. If theBinder
class could do the same, we could makeformat_template()
a method onBinder
.Additionally, this would allow for layered configurations: