I working improve the quality of the scripts I write to make them more maintainable avoiding hard coding values. So far I'm using a json file to save this values, E.G.

A json file called config\_test.json:

```
{"input_dir":"data/input",
"output_dir":"data/output",
"default_value":10,
"dtypes":["str","int","str","float"]
}

```

Then I read this values from the main file:

```
import json
with open('config_test.json') as f:
    config_d = json.load(f)
config_d

default_value =   config_d['default_value']
dtypes =   config_d['dtypes']
input_dir =   config_d['input_dir']
output_dir =   config_d['output_dir']

```

I'm not completely comfortable with this solution, is there any standard approach to writing config files in python?