Python Configparser Module
Configuration file parser — sections, options, get, getint, write. This category documents 11 Python configparser module entries, and each page gives you the full syntax, the parameter list, the return value, and a runnable example. The entries include: configparser.ConfigParser(), configparser.read(), configparser.sections(), configparser.options(), configparser.get(), configparser.getint(), configparser.getboolean(), configparser.set(), configparser.write(), configparser.remove_section(), configparser.add_section(). configparser.ConfigParser() creates a configuration file parser (like INI files). configparser.read() reads configuration from one or more files. configparser.sections() returns a list of sections (excluding DEFAULT). configparser.options() returns a list of all option keys in a section. configparser.get() gets a value as a string from a section. For a structured walkthrough of the whole topic, read the Configparser Module guide. Configparser Module belongs to the Dev Tools group alongside Inspect Module, Pdb Module, Traceback Module, Timeit Module. You can also search across every category from the search page, browse the complete A–Z index, or try any example in the Python playground.