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!
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.
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 withNone
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 viaassert some_value is not None
for example) but it would be much cleaner if such required options are available.