{"id":27315,"library":"python-troveclient","title":"Python Trove Client","description":"Python-troveclient is the official OpenStack client library for interacting with the Trove (DBaaS) API. It provides both a Python API and a command-line interface for managing database instances, backups, configurations, and other database-as-a-service resources. Current version is 8.10.0, with a semi-regular release cadence aligned with OpenStack releases.","status":"active","version":"8.10.0","language":"python","source_language":"en","source_url":"https://github.com/openstack/python-troveclient","tags":["openstack","trove","database","dbaas","client"],"install":[{"cmd":"pip install python-troveclient","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Starting in python-troveclient 3.0.0, the client module was moved to be a top-level import. Using the old path raises ImportError.","wrong":"from troveclient.v1 import client","symbol":"client","correct":"from troveclient import client"}],"quickstart":{"code":"from troveclient import client\nfrom keystoneauth1 import session\nfrom keystoneauth1.identity import v3\n\nauth = v3.Password(auth_url=os.environ.get('OS_AUTH_URL', 'http://localhost:5000/v3'),\n                   username=os.environ.get('OS_USERNAME', 'admin'),\n                   password=os.environ.get('OS_PASSWORD', 'admin'),\n                   project_name=os.environ.get('OS_PROJECT_NAME', 'admin'),\n                   user_domain_name='Default')\nsess = session.Session(auth=auth)\ntrove = client.Client('1', session=sess)\ninstances = trove.instances.list()\nprint(instances)","lang":"python","description":"Authenticate with Keystone and list all database instances."},"warnings":[{"fix":"Use 'from troveclient import client' instead of 'from troveclient.v1 import client'.","message":"The client module moved from troveclient.v1.client to troveclient.client in version 3.0.0. Old imports will break.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Use API version '1' (for v1.1) when creating the client. Older API versions are no longer available.","message":"Support for the v1.0 API (troveclient.v1) was removed in version 5.0.0. Only the v1.1 API version is supported.","severity":"breaking","affected_versions":">=5.0.0"},{"fix":"Install keystoneauth1 explicitly: 'pip install python-troveclient keystoneauth1'.","message":"python-troveclient requires 'python-keystoneclient' or 'keystoneauth1' for authentication. If only troveclient is installed, it will fail at runtime with ImportError.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Replace with 'from troveclient import client'.","cause":"Using wrong import path; old code uses 'from troveclient.v1 import client' which no longer exists.","error":"ImportError: cannot import name 'client' from 'troveclient'"},{"fix":"Verify the instance ID and check that the user has appropriate role assignments in OpenStack.","cause":"The requested instance ID does not exist or the user lacks permissions.","error":"troveclient.exceptions.NotFound: Database instance not found (HTTP 404)"},{"fix":"Check OS_USERNAME, OS_PASSWORD, OS_AUTH_URL environment variables or re-authenticate with a valid token.","cause":"Invalid or expired Keystone credentials.","error":"keystoneauth1.exceptions.http.Unauthorized: The request you have made requires authentication (HTTP 401)"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}