Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #109735

Tie dictionary to database table?

From "Peter Heitzer" <peter.heitzer@rz.uni-regensburg.de>
Newsgroups comp.lang.python
Subject Tie dictionary to database table?
Date 2016-06-09 12:30 +0000
Message-ID <drt5r8Ft1maU1@mid.individual.net> (permalink)

Show all headers | View raw


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@middle-of-nowhere.org'

in my python script it generates a statement like
update users set email='frank@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@rz.uni-regensburg.de

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Tie dictionary to database table? "Peter Heitzer" <peter.heitzer@rz.uni-regensburg.de> - 2016-06-09 12:30 +0000
  Re: Tie dictionary to database table? justin walters <walters.justin01@gmail.com> - 2016-06-09 06:09 -0700
  Re: Tie dictionary to database table? Michael Selik <michael.selik@gmail.com> - 2016-06-09 22:40 +0000
    Re: Tie dictionary to database table? "Peter Heitzer" <peter.heitzer@rz.uni-regensburg.de> - 2016-06-10 07:30 +0000
      Re: Tie dictionary to database table? Christian Gollwitzer <auriocus@gmx.de> - 2016-06-10 09:38 +0200
        Re: Tie dictionary to database table? "Peter Heitzer" <peter.heitzer@rz.uni-regensburg.de> - 2016-06-10 10:56 +0000
          Re: Tie dictionary to database table? Peter Otten <__peter__@web.de> - 2016-06-10 14:25 +0200
  Re: Tie dictionary to database table? Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-16 20:59 -0700

csiph-web