Pickle > Shelve > Small SQL Databases
a-steinhoff at web.de
Sun Aug 25 20:17:02 CEST 2002
chris.lyon at spritenote.co.uk (Chris Lyon) wrote in message news:<d232c5e.0208250245.7e5c0ea0 at posting.google.com>...
> 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.
No ... that's wrong. There is a quite new version 1.0 at
http://www.sf.net/projects/gadfly . I'm using it without any problems ..
There are also bindings for SQLite -> http://www.sf.net/projects/pysqlite
> 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