configparser.getboolean()
configparser.getboolean() is a Python method in the Configparser Module category. Gets a value as a boolean (True/1/yes/on or False/0/no/off). The syntax is configparser.getboolean(section, option, *, raw=False, vars=None, fallback=_UNSET). Returns: Boolean. A typical example: debug = config.getboolean("server", "debug") # True/False. A close sibling is configparser.ConfigParser(), which creates a configuration file parser (like INI files). A close sibling is configparser.read(), which reads configuration from one or more files. A close sibling is configparser.sections(), which returns a list of sections (excluding DEFAULT). A close sibling is configparser.options(), which returns a list of all option keys in a section. More about this category: Configuration file parser — sections, options, get, getint, write. For a broader walkthrough, read the Configparser Module guide. Related Configparser Module entries: configparser.ConfigParser(), configparser.read(), configparser.sections(), configparser.options(), configparser.get(), configparser.getint(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details.