Pickle > Shelve > Small SQL Databases

Chris Lyon chris.lyon at spritenote.co.uk
Sun Aug 25 12:45:04 CEST 2002

I am trying to maintain state of a bunch of python objects and the
relationships between them in a web based application.
I have categories that may contain programmes or categories but not
both, programmes that can contain only video clips. and I am trying to
store all these elements.

I am using pickle at the moment, but this means that on every page the
entire list of objects needs to be loaded in which will get slow
(exponantially ?) with increased no of objects, so I've looked at
Shelves, very handy for examining one object quickly but on trying to
alter values it's very difficult to access the other appropriate
elements in the shelve to find the elements that can act as parents to
the object I might wish to reallocate. ( in essence I need a list of
allowable selctions to offer on the maintenance page and the only way
I can see to do this to to use keys() to get the list of objects and
then walk the list.

I seem to be wandering towards SQL but know of only Gadfly from the
lutz book and reading around this seems to not being maintained any
more so I am a little wary.

I am barking up completely the wrong tree ( i.e.) is there yet another
glorous python module that will do it all for me or is Gadfly the way
to go?

I have been on this problem for several weeks now and am worried about
building some humongous lump of self referential engines that will be
a nightmare to maintain. I already have several examples of these if
any one collects such ephemera.

Chris Lyon

More information about the Python-list mailing list