Persist Python objects to a MySQL database?

Skip Montanaro skip at pobox.com
Tue Jun 24 09:44:33 EDT 2003


    Miki> Hello Robert,

    >> I did a Google search (+persist +python +MySQL) and saw a few
    >> references to persisting a Python object (class instance) to a MySQL
    >> database, but nothing extensive.  Is there anything new that does
    >> this, hopefully in a relatively transparent manner?

    Miki> You can always pickle the object to a string (using pickle.dumps)
    Miki> and save it in the database. Later use pickle.loads to load it.

Also, try searching for (+object +relational +mapper +python).  One
promising hit is

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

Skip





More information about the Python-list mailing list