Persist Python objects to a MySQL database?
Miki Tebeka
tebeka at cs.bgu.ac.il
Tue Jun 24 01:28:01 EDT 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.
HTH.
Miki
More information about the Python-list
mailing list