is there a module to work with pickled objects storage in database?

krishnakant Mane researchbase at gmail.com
Fri May 4 06:18:41 EDT 2007


hello all,
I am trying a very complex kind of a task in a project.
I have a knowledge management system where I need to store a lot of
objects (pickled).  I have to store mostly lists and dictionaries into
a rdbms.
mostly I will be using mysql.  I want to know if there is any module
that can help me store a pickled object inside a blob field instead of
a file.  I know that pickle.dump() can store an object into a file but
I can't find a way to transfer pickled objects into a database.
I so far tried to read a dumpped file for pickled object and directly
right the contents of the file to the blob field in my database.
but that does not seam to give the right result.
I first dump the object into the file through pickle.dump and then
open the file in read mode.
then I read the contents of the file and then store what ever comes
out into the blob field.
I know this is not right and there should be ways of storing a pickled
object other than file.
Please guide me on this issue.
regards.
Krishnakant.



More information about the Python-list mailing list