def create_client(toml_config=None): """Creates a Marathon client with the supplied configuration. :param toml_config: configuration dictionary :type toml_config: config.Toml :returns: Marathon client :rtype: dcos.marathon.Client """ if toml_config is None: toml_config = config.get_config() marathon_url = _get_marathon_url(toml_config) timeout = config.get_config_val('core.timeout') or http.DEFAULT_TIMEOUT rpc_client = rpcclient.create_client(marathon_url, timeout) logger.info('Creating marathon client with: %r', marathon_url) return Client(rpc_client)