def load_request(): """Load the options from the source """ with open('example-request.json', 'r') as fd: json_data = fd.read() # Convert to a namedtuple nt = convert_dictionary_to_namedtuple('request', json.loads(json_data)) request = PropertyDict() request.request = nt request.xml_filename = '.'.join([nt.product_id, 'xml']) return request