eladrich / pyrallis

Pyrallis is a framework for structured configuration parsing from both cmd and files. Simply define your desired configuration structure as a dataclass and let pyrallis do the rest!
https://eladrich.github.io/pyrallis/
MIT License
189 stars 7 forks source link

Default value for field with no value specified / required field #23

Open breengles opened 1 year ago

breengles commented 1 year ago

Hi!

Is there any way to specify that some field is required (see, e.g., click's required option)?

Also, by default one cannot use field from dataclasses with no default value (with every other parameter left also by default) while with pyrallis it is replaced with None value instead. Although, personally I am not having any problem with that (even more, with that behaviour, I can somewhat manually check for required fields via assert some_value is not None for example) but it would be much cleaner if such required options are available.

bsridatta commented 1 year ago

Any update of this?