Import json files directly in your python scripts
direct-json-import Import json files directly in your python scripts. Install Install from git repository pip install git+https://github.com/zaghaghi/direct-json-import.git Use With the following json in a file named info.json. { “name”: “hamed”, “lastname”: “zaghaghi”, “repos”: [ “https://github.com/zaghaghi/direct-json-import” ] } you can directly import it as follows import info print(info.data) # {‘name’: ‘hamed’, ‘lastname’: ‘zaghaghi’, ‘repos’: [‘https://github.com/zaghaghi/direct-json-import’]} GitHub https://github.com/zaghaghi/direct-json-import
Read more