Crazy Imports - treat your data as your code
crazyimports module allows you to use your data files as if it was python modules
Simple example
Install crazyimports module
pip install -U crazyimports
Create example.json file with this content
{"number": 42}
Than in the same directory create test.py file
import crazyimports
import example
print(example.number)
Then when you run python test.py you would see 42 output in your command line
You can find more examples in examples section of documentation
Supported file extensions
.jsonfor JSON files.sqlite3and.sqlitefor SQLite3 database files.csvfor CSV (Comma Separated Values) files.yamland.ymlfor YAML files.picklefor pickle files.tomlfor toml files