There are several possibilities:
I slightly prefer toml (see an example of config file here https://github.com/cta-observatory/cta-lstchain/blob/master/docs/examples/post_dl2_analysis/config_wobble.toml) since it allows for comments and it has nice readability. It would require to install the toml package.
How to use it:
import toml
config = toml.load(config_file_name)
bar_value = config['foo']['bar']
Side note: maybe for constant it would be more convenient to directly use scipy.constants https://docs.scipy.org/doc/scipy/reference/constants.html