class documentation

class ACMEConfiguration(configparser.ConfigParser):

Constructor: ACMEConfiguration(defaults)

View In Hierarchy

ACMEConfiguration class extends the standard ConfigParser to provide additional functionality for managing configuration settings in a structured way. It allows for case-sensitive option names and ensures that sections are created if they do not exist.

Method __init__ Initialize the ACMEConfiguration object.
Method __str__ Return a string representation of the configuration.
Method set Set a configuration option in the specified section.
Instance Variable optionxform Replace the default option name transformation to preserve case sensitivity.
def __init__(self, defaults: dict[str, str] | None = None):

Initialize the ACMEConfiguration object.

Parameters
defaults:dict[str, str] | NoneOptional dictionary with default values for the configuration.
def __str__(self) -> str:

Return a string representation of the configuration.

Returns
strA string representation of the configuration, with sections and options formatted for readability.
def set(self, section: str, option: str, value: str | None = None):

Set a configuration option in the specified section.

This overrides the default set method to ensure that the section is created if it does not exist.

Parameters
section:strThe section in which to set the option.
option:strThe option to set.
value:str | NoneThe value to set for the option. If None, the option will be set without a value.
optionxform =

Replace the default option name transformation to preserve case sensitivity.