Registry / aws / python-watcherclient

python-watcherclient

JSON →
library4.10.0pypypi✓ verified 86d ago

Python client library for the OpenStack Watcher (optimization) API. Current version: 4.10.0. Release cadence follows OpenStack releases (approx. every 6 months).

pip install python-watcherclient
INSTALL
IMPORT
SIG · PYTHON-WATCHERCLIE
P
python-watcherclient
awspythonv4.10.0
Install
9.2s avg
Import
1168ms
Disk
112MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v4.10.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 1.226s · 104.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 9.2s · import 1.110s · 106MB
112MB installed
● package 112MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

client
from watcherclient import client
from python_watcherclient import client
Hyphen in package name, underscore in module.

Authenticate and list audits.

from watcherclient import client from keystoneauth1 import session from keystoneauth1.identity import v3 auth = v3.Password(auth_url=os.environ.get('OS_AUTH_URL', 'http://localhost:5000/v3'), username=os.environ.get('OS_USERNAME', 'admin'), password=os.environ.get('OS_PASSWORD', 'password'), project_name=os.environ.get('OS_PROJECT_NAME', 'admin'), user_domain_name=os.environ.get('OS_USER_DOMAIN_NAME', 'Default')) sess = session.Session(auth=auth) wc = client.Client(1, session=sess) print(list(wc.audit.list()))
watcher --version
Debug
Known issues
breakingVersion 4.0.0 dropped support for Python < 3.8. Version 4.10.0 requires Python >= 3.10.
fix
Upgrade to Python >= 3.10.
affects: >=4.0.0
deprecatedThe 'watcherclient.commands' module is deprecated and will be removed in a future release. Use the openstacksdk-based osc-lib plugin instead.
fix
Migrate to 'openstack watcher' CLI or use osc-lib plugin.
affects: >=4.0.0
gotchaSession object must be passed to client constructor; omitting it causes authentication errors.
fix
Always create a keystoneauth1 session and pass it to client.Client().
affects: all
gotchaThe API version (e.g., 1) is required as first argument to client.Client(). Missing version raises TypeError.
fix
Pass the API version: client.Client(1, session=sess).
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'watcherclient'
Package not installed or wrong import name.
fix
Install with 'pip install python-watcherclient' and import as 'from watcherclient import client'.
watcherclient.exceptions.Unauthorized: Unauthorized
Invalid or missing authentication credentials.
fix
Verify environment variables OS_AUTH_URL, OS_USERNAME, OS_PASSWORD are set correctly.
TypeError: Client() missing 1 required positional argument: 'version'
API version argument omitted.
fix
Call client.Client(1, session=sess) (API version is the first argument).
ValueError: API version x is not supported
Using unsupported API version.
fix
Use version 1 (the only stable version).
Upgrade
Version history
4.10.0latest on PyPI · released Feb 27, 2026
Audit
Dependencies
openstacksdkrequiredUnderlying SDK for OpenStack API communication
keystoneauth1requiredAuthentication
osc-librequiredOpenStack client support
Agent activity
36 hits · last 30 days
node
24
Amazon
1
Resources
python-watcherclient — pip install python-watcherclient · libregistry