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

Question/feature request: drop-in replace pydantic dataclass #24

Open vedal opened 1 year ago

vedal commented 1 year ago

Thanks alot for an amazing package!! Has most of the stuff I've been looking around for in (many) other packages. Is it possible to replace python built-in dataclass with pydantic dataclass to allow for run-time data validation with pyrallis? It would be a great feature improvement. I havent found the argparse+pydantic combination anywhere else.

eladrich commented 1 year ago

Interesting idea! I'm actually not sure but we will give it a try and see whether that can be easily achieved

vedal commented 1 year ago

That's great @eladrich!!! Here is an example of what I mean by triggering run-time validation