os-client-config is a Python library designed for standardizing OpenStack client configuration. It aggregates configuration data from environment variables (prefixed with `OS_`) and `clouds.yaml` files, providing a consistent interface for OpenStack applications. The current version is 2.3.0. While still maintained, it is largely superseded by `openstacksdk` for new development.
pip install os-client-configVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to initialize `OpenStackConfig` and retrieve the configuration for a named OpenStack cloud. The library automatically looks for configuration in environment variables (`OS_*`) or `clouds.yaml` files located in the current directory, `~/.config/openstack`, or `/etc/openstack`.
Migrate your application to use `openstacksdk` directly. Install with `pip install openstacksdk` and update your import paths and client instantiation logic.
Ensure that all clouds you intend to use are consistently defined across both `clouds.yaml` and `secrets.yaml` files, especially if using OpenStack dynamic inventories or similar tools.
Use generic `OS_USERNAME` and other `OS_*` prefixed environment variables. Refer to the OpenStack official documentation for the correct, current environment variable names.
Avoid building from tarball releases directly if you encounter this issue. The recommended workaround is to build from the git package and ensure proper tagging, or rely on official PyPI releases which are pre-built correctly.
Verify that either the `OS_CLOUD` environment variable is set to a valid cloud name, or that a `clouds.yaml` file exists in one of the standard locations (`.`, `~/.config/openstack`, `/etc/openstack`) and contains a definition for the cloud name you are trying to access. Ensure the cloud name in your code matches the configuration.