Most Pythonic way to store (small) configuration

Dan Sommers dan at
Mon Aug 3 06:02:54 CEST 2015

On Sun, 02 Aug 2015 16:11:14 -0500, Tim Chase wrote:

> On 2015-08-02 21:54, Ben Finney wrote:

>> So, both XML and JSON should be considered write-only, and produced
>> only for consumption by a computer; they are a poor choice for
>> presenting to a human.


> I second Ben's thoughts against XML & JSON -- they *can* be edited by
> hand, but put the onus on the user to make perfect XML/JSON.  Config
> files (".ini") are more forgiving.


> An additional option is using a sqlite database.  The sqlite library
> is part of the stdlib, and advantages include being a single file,
> expandability, consistent/reliable character encoding, cross-platform
> portability, and atomicity (utilities that read/write are blocked from
> getting/creating incomplete data seen by the other file).

Well, I have at least some non-zero chance of reading and writing JSON
or XML by hand.  Can the same be said for a sqlite database?  ;-)

More information about the Python-list mailing list