import json

PROJECT_JSON_LOC = 'projects.json'

def get_projects():
	with open(PROJECT_JSON_LOC, 'r') as f:
		data = json.load(f)
	project_list = data['projects']
	return project_list
import json
import os

PROJECT_JSON_LOC = 'data/projects'

def get_projects():
    projects = {}
    
    for file_name in os.listdir(PROJECT_JSON_LOC):
        long_file_name = os.path.join(PROJECT_JSON_LOC, file_name)
        with open(long_file_name, 'r') as file:
            data = json.load(file)
        projects[file_name] = data
    
    return projects

Implement directory crawl to build projects dict