Install & Compatibility
Where this runs
tested against v24.6.1 · 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
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 1.143s · 25.6MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 2.6s · import 0.939s · 27MB
28MB installed
● package 28MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
api
✓ from awxkit import api
✗ from awxkit import api, config, utils, cli
config
✓ from awxkit import config
utils
✓ from awxkit import utils
This quickstart demonstrates how to connect to an AWX instance using username/password authentication and list organizations. It uses environment variables for secure credential handling.
import os
from awxkit.api import ApiV2, config
from awxkit.api.resources import resources
from awxkit.utils import PseudoNamespace
# Configure AWX host and credentials
config.base_url = os.environ.get('AWX_HOST', 'https://localhost:8043')
config.credentials = PseudoNamespace({
'default': {
'username': os.environ.get('AWX_USERNAME', 'admin'),
'password': os.environ.get('AWX_PASSWORD', 'password'),
'insecure': os.environ.get('AWX_INSECURE_SSL', 'False').lower() == 'true'
}
})
try:
# Load a session and get available API resources
session_connection = ApiV2().load_session().get()
api_resources = session_connection.get(resources)
print(f"Successfully connected to AWX at: {config.base_url}")
print(f"Available API resources: {list(api_resources.keys())}")
# Example: List all organizations
organizations = api_resources.organizations.get().results
print(f"Found {len(organizations)} organizations:")
for org in organizations:
print(f" - {org.name} (ID: {org.id})")
except Exception as e:
print(f"Error connecting to AWX: {e}")
print("Please ensure AWX_HOST, AWX_USERNAME, AWX_PASSWORD, and AWX_INSECURE_SSL (optional) environment variables are set correctly.")
awx --version
Debug
Known issues
breakingStarting with AWXKit 24.0.0, JSON Web Tokens (JWT) became the default authentication method. This might require updates to existing authentication logic that relied on older defaults.fixReview authentication code for JWT compatibility. If using username/password, explicitly configure `config.credentials` as shown in the quickstart or use OAuth2 tokens.
affects: >=24.0.0
breakingAWXKit 24.1.0 updated the required Python version from 3.9 to 3.11. Running on older Python versions (e.g., 3.9 or 3.10) may lead to unexpected errors or incompatibility issues.fixEnsure your environment uses Python 3.11 or newer. Upgrade your Python interpreter if necessary.
affects: >=24.1.0
gotchaAWXKit version 24.3.0 was explicitly marked as 'DO NOT USE/UPGRADE' in its release notes due to critical issues.fixAvoid installing or upgrading to version 24.3.0. Use 24.3.1 or a later stable release.
affects: 24.3.0
gotchaUsing awxkit with Python 3.13 can lead to `TypeError: HelpfulArgumentParser._parse_known_args()` or `AttributeError: 'CLI' object has no attribute 'verbose'` errors due to changes in Python's `argparse` module.fixAs a temporary workaround, use Python 3.11 or 3.12. Monitor GitHub issues for a permanent fix compatible with Python 3.13.
affects: >=24.6.1 (with Python 3.13)
deprecatedThe `awxkit` library currently relies on the `pkg_resources` module, which is deprecated in modern Python versions and might lead to future compatibility issues or warnings.fixNo direct fix for users; this requires an upstream update to use `importlib.metadata` instead.
affects: All versions
breakingAfter version 24.6.1, AWX is undergoing significant architectural refactoring to a pluggable service-oriented design. This shift may introduce substantial breaking changes and impact stability, as semantic versioning is being replaced by CalVer.fixIf using AWXKit in a production environment, consider moving to Red Hat Ansible Automation Platform for greater stability. For development or lab environments, be prepared for potential breaking changes and monitor AWX project updates closely.
affects: >24.6.1
Upgrade
Version history
24.6.1latest on PyPI · released Jul 2, 2024
Audit
Dependencies
pythonrequiredRequires Python >=3.8.
setuptoolsrequiredCore dependency for package distribution.
AWX (Ansible Automation Platform Controller)requiredawxkit is a client library for the AWX/Controller REST API; requires a running AWX instance.