Registry /
aws / assisted-service-client
Install & Compatibility
Where this runs
tested against v2.53.0.post8 · 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 0.487s · 25.2MB
glibcpy 3.10–3.920 runs
installs and imports cleanly · install 2.9s · import 0.429s · 26MB
24MB installed
● package 24MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ApiClient
✓ from assisted_service_client import ApiClient
Configuration
✓ from assisted_service_client import Configuration
InstallerApi
✓ from assisted_service_client.api.installer_api import InstallerApi
Specific API classes are found under the `assisted_service_client.api` submodule.
ApiException
✓ from assisted_service_client import ApiException
Common exception for API errors.
This quickstart demonstrates how to initialize the `assisted-service-client`, configure it with a host URL and authentication token (retrieved from environment variables for safety), instantiate the `InstallerApi`, and make a simple call to list existing clusters. It also includes basic error handling for common API issues.
import assisted_service_client
import os
# Configure API client with host and authentication token
# In a production environment, these should come from secure sources (e.g., environment variables, secrets manager)
configuration = assisted_service_client.Configuration(
host=os.environ.get("ASSISTED_SERVICE_URL", "http://localhost:8090/api/assisted-install/v2"),
access_token=os.environ.get("ASSISTED_SERVICE_TOKEN", "") # Replace with your actual token
)
# Create an API client instance
api_client = assisted_service_client.ApiClient(configuration)
try:
# Instantiate a specific API (e.g., InstallerApi for cluster management)
installer_api = assisted_service_client.api.installer_api.InstallerApi(api_client)
# Example: List all clusters
clusters = installer_api.list_clusters()
print(f"Successfully retrieved {len(clusters)} clusters.")
for cluster in clusters:
print(f"- Cluster ID: {cluster.id}, Name: {cluster.name}, Status: {cluster.status}")
except assisted_service_client.ApiException as e:
print(f"API Error: {e.status} - {e.reason}\nBody: {e.body}")
if e.status == 401:
print("Authentication failed. Please check your ASSISTED_SERVICE_TOKEN.")
except Exception as e:
print(f"An unexpected error occurred: {e}")
finally:
# Close the API client when done to release resources
api_client.close()
Debug
Known issues
breakingAs a generated client, API method signatures and data models can change significantly between `assisted-service-client` versions, especially following updates to the underlying Assisted Service API. Mismatches between client and service versions can lead to `AttributeError` for missing fields/methods or `ApiException` due to invalid requests/responses.fixAlways ensure your `assisted-service-client` version is compatible with the Assisted Service instance you are targeting. It is best practice to upgrade the client to the latest version alongside major/minor updates of the Assisted Service.
affects: All versions, whenever the Assisted Service API changes.
gotchaThe client requires proper authentication, typically via an `access_token`. Incorrect, expired, or missing tokens will result in `ApiException` with a 401 Unauthorized status.fixEnsure `assisted_service_client.Configuration(access_token='YOUR_TOKEN')` is correctly set with a valid token. Refer to the Assisted Service documentation for how to obtain and manage API tokens.
affects: All versions.
gotchaProviding an incorrect `host` URL in the `Configuration` can lead to connection errors (`requests.exceptions.ConnectionError`) if the service is unreachable, or `ApiException` (e.g., 404 Not Found) if the base path is wrong or the endpoint does not exist.fixVerify that `assisted_service_client.Configuration(host='YOUR_SERVICE_URL')` points to the correct and accessible Assisted Service API endpoint (e.g., typically ends with `/api/assisted-install/v2`). Check network connectivity and firewall rules.
affects: All versions.
Errors
Common errors & fixes
assisted_service_client.ApiException: (401) Reason: Unauthorized
The API request was made without a valid or unexpired authentication token, or the provided token does not have sufficient permissions.
fixEnsure the `Configuration` object's `access_token` parameter is set with a valid, active authentication token (e.g., an OpenShift pull secret or a generated API key). Example: `Configuration(access_token='your_actual_token')`.
requests.exceptions.ConnectionError: HTTPSConnectionPool(...) Max retries exceeded with url: ...
The Python client could not establish a connection to the specified `host` URL, often due to an incorrect URL, network issues, DNS problems, or the Assisted Service being down/inaccessible.
fixVerify that the `host` parameter in `assisted_service_client.Configuration` points to the correct and reachable URL of the Assisted Service. Check network connectivity from your client to the service endpoint and ensure no firewalls are blocking access.
AttributeError: 'Cluster' object has no attribute 'new_field'
Your `assisted-service-client` library version is older than the Assisted Service instance it's interacting with. The service API has introduced new fields or methods that your client's data models or API classes do not yet recognize.
fixUpgrade your `assisted-service-client` package to the latest available version using `pip install --upgrade assisted-service-client`. This ensures your client models and API definitions are synchronized with the most recent service API.
Upgrade
Version history
2.53.0.post70latest on PyPI · released Jun 12, 2026
Audit
Dependencies
No dependency data recorded yet.