# demo of weirdness dic = { 'spouse_name': '', 'last_name': 'Smith', 'middle_name': '', 'suffix': '', 'application_annotations': { 'Funambol Exchange': { 'private_application_annotations': { 'created_timestamp': 1282566126030L, 'exchange_hash': '3a670a52a2a43466fe1c71e50e4ed617', 'email': '84aa15b7-f8e2-41e7-ba8f-60b25e302022' }, 'application_fields': { 'photo': '', 'state': 'N', 'urlWork': '', 'children': '', 'urlHome': '' } } }, 'title': '', 'nick_name': '', '_rev': '3-4ac012ecab57171fc22aab4853054f8f', 'first_name': 'Minh', '_attachments': { 'photo': { 'stub': True, 'length': 4631, 'revpos': 3, 'content_type': 'image/png' } }, 'record_type': 'http://www.freedesktop.org/wiki/Specifications/desktopcouch/contact', 'department': '', '_id': '0167decee3fd4193b551231f12033033', 'company': '', 'notes': '', 'email_addresses': { '84aa15b7-f8e2-41e7-ba8f-60b25e302022': { 'description': 'other', 'address': '<email address hidden>' }, '_order': ['84aa15b7-f8e2-41e7-ba8f-60b25e302022'] }, 'job_title': '' }
r = Record(dic) print r._attachments
# demo of weirdness n_annotations' : {
'private_ application_ annotations' : {
'created_ timestamp' : 1282566126030L,
'exchange_ hash': '3a670a52a2a434 66fe1c71e50e4ed 617',
'email' : '84aa15b7- f8e2-41e7- ba8f-60b25e3020 22'
'applicati on_fields' : {
'photo' : '',
'state' : 'N',
'urlWork' : '',
'children' : '',
'urlHome' : '' 171fc22aab48530 54f8f',
'length' : 4631,
'revpos' : 3,
'content_ type': 'image/png' www.freedesktop .org/wiki/ Specifications/ desktopcouch/ contact', 93b551231f12033 033', addresses' : {
'84aa15b7- f8e2-41e7- ba8f-60b25e3020 22': {
'descripti on': 'other',
'address' : '<email address hidden>' f8e2-41e7- ba8f-60b25e3020 22']
dic = {
'spouse_name': '',
'last_name': 'Smith',
'middle_name': '',
'suffix': '',
'applicatio
'Funambol Exchange': {
},
}
}
},
'title': '',
'nick_name': '',
'_rev': '3-4ac012ecab57
'first_name': 'Minh',
'_attachments': {
'photo': {
'stub': True,
}
},
'record_type': 'http://
'department': '',
'_id': '0167decee3fd41
'company': '',
'notes': '',
'email_
},
'_order': ['84aa15b7-
},
'job_title': ''
}
r = Record(dic)
print r._attachments