contact database. Add new person, phone, email, etc.
Here's a short example
1 2 import contacts 3 db = contacts.open() 4 5 all_ids = db.keys() # [159, 161, 273, ...] 6 c = db[159] # first contact 7 found = db.find('jim') # search in name, email, etc. 8 jim = found[0] # first one found 9 10 jim_id = jim.id # 819 11 mobile = jim.find('mobile_number')[0].value # first only 12 firstname = jim.find('first_name')[0].value 13 # other fields: email_address, url, company_name, job_title, 14 # phone_number, fax_number, note, etc. 15 16 # to add new contact 17 newc = db.add_contact() 18 newc.add_field('first_name', 'Korakot') 19 newc.add_field('mobile_number', '017337330') 20 newc.commit()
Group infomation is missing, though.
I can't import it.