Files
overdrive-plex/XML_JSON/json_scripts.py
T
2023-11-12 00:10:13 -05:00

13 lines
397 B
Python

import os
import json
def load_config(file_path):
"""Load the JSON config file and return a dictionary."""
with open(file_path, 'r') as file:
return json.load(file)
def json_to_env(json_file_path):
with open(json_file_path, 'r') as json_file:
config = json.load(json_file)
for key, value in config.items():
os.environ[key.upper()] = str(value)