yukinarit/envclasses

Create an instance from env vars

Opened this issue · 2 comments

Currently load_env function takes an instance of dataclass.

foo = Foo()
load_env(foo, ...)

This feature extends load_env to accept a class as the first argument and create an instance from env vars

foo = load_env(Foo, ...)
hit9 commented

How about foo = Foo.from_env(...) ?

Hi @hit9

Sounds good!