The Python Way for module configuration?
python at mrabarnett.plus.com
Sat Jun 27 22:38:39 CEST 2009
> [PYTHON NOOB ALERT]
> I want to write a module that serves as a Python front-end to a
> database. This database can be either in the form of tab-delimited
> flat files, XML files, or a PostgreSQL server. The module is meant
> to hide these database implementation details from its users.
> But, minimally, the module needs to have some configuration details
> to know where to get the data. There are many ways to provide this
> configuration data to the module, but I would like to know what's
> considered "best practice" for this type of problem in the Python
> Ideally, I'm looking for a system that is unobtrusive under normal
> operations, but easy to override during testing and debugging.
> I would appreciate your comments and suggestions.
There are already modules which provide access to databases.
More information about the Python-list