Config API¶
Warning
This feature is experimental and subject to breaking changes. See the Conan stability section for more information.
- class ConfigAPI(conan_api, helpers)¶
This API provides methods to manage the Conan configuration in the Conan home folder. It allows installing configurations from various sources, retrieving global configuration values, and listing available configurations. It also provides methods to clean the Conan home folder, resetting it to a clean state.
- home()¶
return the current Conan home folder containing the configuration files like remotes, settings, profiles, and the packages cache. It is provided for debugging purposes. Recall that it is not allowed to write, modify or remove packages in the packages cache, and that to automate tasks that uses packages from the cache Conan provides mechanisms like deployers or custom commands.
- install(path_or_url, verify_ssl, config_type=None, args=None, source_folder=None, target_folder=None)¶
install Conan configuration from a git repo, from a zip file in an http server or a local folder
- install_pkg(ref, lockfile=None, force=False, remotes=None, profile=None) PkgReference ¶
install configuration stored inside a Conan package The installation of configuration will reinitialize the full ConanAPI
- get(name, default=None, check_type=None)¶
get the value of a global.conf item
- show(pattern) dict ¶
get the values of global.conf for those configurations that matches the pattern
- static conf_list()¶
list all the available built-in configurations
- clean()¶
reset the Conan home folder to a clean state, removing all the user custom configuration, custom files, and resetting modified files