import json html_string = '''

Libraries on GitLab

''' with open("all-libs-gitlab.json", 'r') as json_file: data = json.load(json_file) for org in data["organisations"]: html_string += "\n" html_string += '''
Country City Organisation Repositories
" + org['country'] + "" + org['city'] + "" + org['name'] + "" + str(len(org['repositories'])) + "
''' with open('libraries-gitlab.html', 'w', encoding='utf8') as html_file: html_file.write(html_string)