Skip to main content

ConfigClient

get_config

Sends the request to get the matching configuration.

Arguments:

section: the optional name of the section.

option: the optional option within the section.

Returns:

dictionary containing the configuration.

set_config_option

Sends the request to create or set an option within a section. Missing sections will be created.

Arguments:

section: the name of the section.

option: the name of the option.

value: the value to set on the config option

use_body_for_params: send parameters in a json-encoded request body instead of url-encoded TODO: remove this parameter The format of the /config endpoint was recently changed. We migrated from performing a PUT on "/config/<section>/<option>/<value>" to sending the parameters using a json-encoded body. This was done to fix multiple un-wanted side effects related to how the middleware treats values encoded in a path. For a smooth transition, we allow both cases for now, but we should migrate to only passing values via the request body.

Returns:

True if option was removed successfully. False otherwise.

delete_config_option

Sends the request to remove an option from a section

Arguments:

section: the name of the section.

option: the name of the option.

Returns:

True if option was removed successfully. False otherwise.