Database Python

import anydbm
file = anydbm.open("filename",'c') 
file['key'] = 'data'            
data = file['key']