Registry / devops / argo-workflows

argo-workflows

JSON →
library6.6.19pypypi✓ verified 86d ago

The `argo-workflows` Python client provides programmatic access to the Argo Workflows API, enabling users to create, manage, and monitor workflows and other resources. It is an OpenAPI-generated client, meaning its version (currently 6.6.19) is closely tied to the Argo Workflows server's API specification. The library is actively maintained, with frequent updates to keep pace with new server features and API changes.

pip install argo-workflows
INSTALL
IMPORT
SIG · ARGO-WORKFLOWS
A
argo-workflows
devopspythonv6.6.19
Install
2.3s avg
Import
348ms
Disk
29MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v6.6.19 · 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 0.366s · 30.9MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 2.3s · import 0.330s · 31MB
29MB installed
● package 29MB
Code
Verified usage

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

Configuration
from argo_workflows import Configuration
ApiClient
from argo_workflows import ApiClient
WorkflowServiceApi
from argo_workflows.api import workflow_service_api
IoArgoprojWorkflowV1alpha1Workflow
from argo_workflows.model import io_argoproj_workflow_v1alpha1_workflow
Commonly imported for constructing workflow definitions, along with other 'io_argoproj_workflow_v1alpha1_*' models.
ApiException
from argo_workflows import ApiException
The base exception class for API errors.

This quickstart demonstrates how to configure the `argo-workflows` client for authentication (using a bearer token from an environment variable), instantiate the `WorkflowServiceApi`, and list workflows in a specified namespace. Ensure `ARGO_WORKFLOWS_HOST` and `ARGO_WORKFLOWS_TOKEN` (if using auth) are set.

import argo_workflows from argo_workflows.api import workflow_service_api import os # Configure API client configuration = argo_workflows.Configuration( host=os.environ.get("ARGO_WORKFLOWS_HOST", "http://localhost:2746"), verify_ssl=os.environ.get("ARGO_WORKFLOWS_VERIFY_SSL", "false").lower() == "true", ) # Bearer Token Authentication (common for Argo Workflows) token = os.environ.get("ARGO_WORKFLOWS_TOKEN") if token: configuration.api_key["Authorization"] = token configuration.api_key_prefix["Authorization"] = "Bearer" else: print("Warning: ARGO_WORKFLOWS_TOKEN not set. API calls might fail without authentication.") # Enter a context with an instance of the API client with argo_workflows.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = workflow_service_api.WorkflowServiceApi(api_client) namespace = os.environ.get("ARGO_WORKFLOWS_NAMESPACE", "argo") # Example namespace try: # Example: List workflows in a given namespace api_response = api_instance.list_workflows(namespace=namespace) print(f"Successfully listed {len(api_response.items)} workflows in namespace '{namespace}'.") if api_response.items: print(f"First workflow: {api_response.items[0].metadata.name}") except argo_workflows.ApiException as e: print(f"Exception when calling WorkflowServiceApi->list_workflows: {e}\n")
Debug
Known issues
gotchaThe `argo-workflows` Python client is auto-generated and its version needs to be compatible with the Argo Workflows server it connects to. Significant version mismatches can lead to API errors or `AttributeError` for missing/changed fields in models.
fix
Always use a client version that is recent and intended for your Argo Workflows server version. Consult the official Argo Workflows GitHub for recommendations or regenerate the client if you are tracking custom API changes.
affects: All versions
gotchaIncorrect host URL or authentication details are common causes of connection failures. SSL certificate verification can also be an issue in non-standard environments.
fix
Verify `ARGO_WORKFLOWS_HOST` (e.g., `http://localhost:2746` or `https://argo.example.com`). Ensure `ARGO_WORKFLOWS_TOKEN` (for bearer token auth) or other credentials are correct. For SSL issues, either configure `verify_ssl=True` with `ssl_ca_cert` pointing to your CA certificate or, for development, set `verify_ssl=False` (not recommended for production).
affects: All versions
gotchaWhen constructing workflow objects, it's easy to miss required fields or provide incorrect types, leading to validation errors (either client-side or server-side). The client-side validation is enabled by default.
fix
Refer to the Argo Workflows API documentation for the exact schema of workflow objects. Check error messages carefully for missing fields. For advanced use cases or custom resource definitions, consider setting `client_side_validation=False` on the Configuration object if you understand the implications.
affects: All versions
Errors
Common errors & fixes
argo_workflows.ApiException: (401) Reason: Unauthorized
The API client failed to authenticate with the Argo Workflows server.
fix
Check that the `ARGO_WORKFLOWS_TOKEN` environment variable is set and contains a valid bearer token for the Argo Workflows API. Ensure the token has the necessary permissions. If using other authentication methods, verify those credentials.
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(...) Read timed out. (Caused by SSLError(CertificateError("hostname '...' doesn't match '...'",)))
SSL certificate verification failed, often due to a mismatch between the hostname in the certificate and the host URL or an untrusted certificate.
fix
Set `verify_ssl=True` in your `Configuration` and provide the path to your CA certificate via `ssl_ca_cert`. Alternatively, if you understand the security risks and for development purposes, set `verify_ssl=False`.
AttributeError: module 'argo_workflows.model.io_argoproj_workflow_v1alpha1_workflow_spec' has no attribute 'entrypoint'
The client version used has a different API specification (e.g., a newer or older Argo Workflows server version) than expected, or there's a typo in the attribute name.
fix
Verify that your `argo-workflows` client version is compatible with your Argo Workflows server version. Update or downgrade the client as necessary. Double-check the attribute name against the official Argo Workflows API documentation.
TypeError: 'NoneType' object is not subscriptable
Attempting to access an item (e.g., `workflow.metadata['name']`) on an object that is `None`, often because a required nested object was not initialized or returned `None` from an API call.
fix
Ensure all required nested objects (e.g., `metadata`, `spec`, `templates`) are properly initialized when constructing workflow requests. For API responses, add checks for `None` before accessing attributes or dict keys.
Upgrade
Version history
6.6.19latest on PyPI · released Feb 16, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
26 hits · last 30 days
node
22
OpenAI (training)
1
Resources