[DB-SIG] Re: DB-SIG Digest, Vol 2, Issue 9

Marcos Sánchez Provencio msanchez at grupoburke.com
Wed May 14 11:02:58 EDT 2003


Try this:

http://www.thinkware.se/cgi-bin/thinki.cgi/ObjectRelationalMappersForPython

ali wrote:

>i'm quite a python newbie and
>i dont actually know if this is a valid question here... anyway, here it
>goes...
>
>is there an available program/software that translates a database
>structure/schema to python classes (code)???
>
>example:
>
>if i have a database table created using this sql:
>
>create table sample (sid int unique, sname char(20));
>
>the program will create a python file with this format:
>
>class sample:
>    def __init__(self, sid, sname=None):
>        self.sid = sid
>        self.sname = sname
>    def setsid(self, sid):
>        self.sid = sid
>    def setsname(self, sname):
>        self.sname = sname
>    def getsid(self): return self.sid
>    def getsname(self): return self.sname
>
>
>
>_______________________________________________
>DB-SIG maillist  -  DB-SIG at python.org
>http://mail.python.org/mailman/listinfo/db-sig
>  
>





More information about the DB-SIG mailing list