def flattened(self):
parsed = self['<STR_LIT>']<EOL>flat = OrderedDict()<EOL>for key in ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>value = parsed[key]<EOL>flat[key] = '<STR_LIT>'.join(value) if type(value) in (list, tuple) else value<EOL><DEDENT>registrar = parsed.get('<STR_LIT>', {})<EOL>for key in ('<STR_LIT:name>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT:url>', '<STR_LIT>'):<EOL><INDENT>flat['<STR_LIT>'.format(key)] = registrar[key]<EOL><DEDENT>for contact_type in ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>contact = parsed.get('<STR_LIT>', {}).get(contact_type, {})<EOL>for key in ('<STR_LIT:name>', '<STR_LIT:email>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT:state>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>', '<STR_LIT>'):<EOL><INDENT>value = contact[key]<EOL>flat['<STR_LIT>'.format(contact_type, key)] = '<STR_LIT:U+0020>'.join(value) if type(value) in (list, tuple) else value<EOL><DEDENT><DEDENT>return flat<EOL>
Returns a flattened version of the parsed whois data