import time from backup_monitoring.parsing.parsers import puredisk_status as parser file = open('test.txt', 'r') stream = parser.stream(file) for record in stream: #print record instance = parser.parse(record) for key, value in instance.items(): print '[%s] = [%s]' % (key, value) file.close()