A configuration file is a form of object persistence. It contains a serialized, plain-text, editable representation of some default state for an application program. We'll expand on the serialization techniques shown in Chapter 10, Serializing and Saving – JSON, YAML, Pickle, CSV, and XML to create files that are specifically used for application configuration. The focus on plain text means that pickle representation will be excluded. Due to the relative complexity of application configurations, CSV files aren't often used for this purpose, either.
Before a user can make use of an editable plain-text configuration file, we must design our application to be configurable. This can often require careful consideration of dependencies and limitations. Additionally, we must define some kind of configuration object that our application...