Configuration Files in Python

Coming from a .Net background, I found it a bit challenging in figuring out how a developer can have a configuration file in the Python application which could be used to read setting values and one does not have to even touch the code to update or save settings. Config files are used to store key-value pairs or some configurable information that could be read or accessed in the code and at some point, of time. If that configuration changes, developers can just change the configuration in that config file and not worry about changing the code as it may require recompiling the code and deploying it. Not only this but using config files make your settings and code more reusable and keeps the settings information at a centralized location and segregated. Of course, sensitive information like passwords, secrets, and certificates should be kept more secure, maybe in cloud vaults. But basic settings used in the application could be part of a configuration file.