Later on one may want to persist some arbitrary Python object. In that case, clearly cPickle plus compression offers speed. Take a look at:
y_serial.py module :: warehouse Python objects with SQLite
"Serialization + persistance :: in a few lines of code, compress and annotate Python objects into SQLite; then later retrieve them chronologically by keywords without any SQL. Most useful "standard" module for a database to store schema-less data."
http://yserial.sourceforge.net
The security issue is also carefully addressed in the internal documentation. This Python module has broad application, and it's very easy to implement < 10 minutes.