fastdoi/config.py

21 lines
414 B
Python
Raw Normal View History

# Load Cogfigs
import os
import json
# Get the absolute path of the main file
main_file_path = os.path.abspath(__file__)
# Get the directory in which the main file resides
MAIN_DIRECTORY = os.path.dirname(main_file_path)
def load_config():
# Open and load the JSON file
with open(MAIN_DIRECTORY+"/config.json", 'r') as file:
data = json.load(file)
return data
__CONFIG__ = load_config()