Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   Re: Persist Python objects to a MySQL database? (http://www.velocityreviews.com/forums/t318775-re-persist-python-objects-to-a-mysql-database.html)

Miki Tebeka 06-24-2003 05:28 AM

Re: Persist Python objects to a MySQL database?
 
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


All times are GMT. The time now is 12:40 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.