Registry / devops / awxkit

awxkit

JSON →
library24.6.1pypypi✓ verified 83d ago

The official command line interface for Ansible AWX, also providing a Python API for interacting with the AWX REST API. As of July 2024, AWXKit is actively maintained, with frequent releases aligning with the AWX project's fast-moving development cadence. The latest stable release is 24.6.1.

pip install awxkit
INSTALL
IMPORT
SIG · AWXKIT
A
awxkit
devopspythonv24.6.1
Install
2.6s avg
Import
1735ms
Disk
28MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 1.143s · 25.6MB
glibc
py 3.103.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.
fix
Review 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.
fix
Ensure 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.
fix
Avoid 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.
fix
As 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.
fix
No 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.
fix
If 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.
Agent activity
37 hits · last 30 days
node
36
OpenAI (training)
1
Resources