python an sqlite objects

skip at skip at
Thu Dec 4 13:20:59 CET 2008

    Bruno> If you serialize a dict, you'll obviously get a dict back. Note
    Bruno> that the point of json is *not* to replace pickle. json is a
    Bruno> *data* serialization format meant to represent "basic" types
    Bruno> (dicts, lists, strings and numbers) in human readable and
    Bruno> (mostly) language-agnostic way. 

Right, which makes it unsuitable as a general object serialization format.
The OP was unclear what he meant when he asked about storing Python objects
in a sqlite database.  In the general case json doesn't cut it.

    Bruno> If you want a Python object store, you'll be better looking at
    Bruno> ZODB, Durus or friends.  --

Or SQLAlchemy or SQLObject.


More information about the Python-list mailing list