import json with open('/home/tim/Projects/OpenLP/openlp_api_tester/scripts/alert.yaml', 'r') as file: commands = json.load(file) #, Loader=yaml.BaseLoader) print(commands) for step in commands: print(step)