Tie dictionary to database table?

Peter Heitzer peter.heitzer at rz.uni-regensburg.de
Thu Jun 9 08:30:32 EDT 2016


In Perl there exists the tie mechanism for key/value type databases like
Berkeley db. Are there any python modules that can do the same for
a column of a mysql table?
Given the following table users:
(
username char(16) not null unique,
email char(128),
fullname char(64)
)

What I would like is if I write 

email['frank']='frank at middle-of-nowhere.org'

in my python script it generates a statement like
update users set email='frank at middle-of-nowhere.org' where username='frank';

Any hints to already existing modules are highly appreciated.



and have 

-- 
Dipl.-Inform(FH) Peter Heitzer, peter.heitzer at rz.uni-regensburg.de


More information about the Python-list mailing list