#!/usr/bin/env python import sys import json import yaml # load from file: with open(sys.argv[1], 'r') as f: js = json.loads(f.read()) print js['cloud-init']