Persist Python objects to a MySQL database?

Miki Tebeka tebeka at
Tue Jun 24 07:28:01 CEST 2003

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?

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


More information about the Python-list mailing list