Package [pydantic](https://docs.pydantic.dev/usage/models/) can be used to read and validate the config file. See one example of its usage [here](https://github.com/WAM2layers/WAM2layers/pull/165).