Skip to main content

Community Maintained Python client for Argo Workflows

Project description

Argo Workflows Python Client

Python client for Argo Workflows

Argo Version: 2.11.8

Installation

pip install argo-workflows

Examples

A quick start example with one of the example workflow

import yaml
import requests
from argo.workflows.client import (ApiClient,
                                   WorkflowServiceApi,
                                   Configuration,
                                   V1alpha1WorkflowCreateRequest)

# assume we ran `kubectl -n argo port-forward deployment/argo-server 2746:2746`

config = Configuration(host="http://localhost:2746")
client = ApiClient(configuration=config)
service = WorkflowServiceApi(api_client=client)
WORKFLOW = 'https://raw.githubusercontent.com/argoproj/argo/v2.11.8/examples/dag-diamond-steps.yaml'

resp = requests.get(WORKFLOW)
manifest: dict = yaml.safe_load(resp.text)

service.create_workflow('argo', V1alpha1WorkflowCreateRequest(workflow=manifest))

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
ArchivedWorkflowServiceApi deleteArchivedWorkflow DELETE /api/v1/archived-workflows/{uid}
ArchivedWorkflowServiceApi getArchivedWorkflow GET /api/v1/archived-workflows/{uid}
ArchivedWorkflowServiceApi listArchivedWorkflows GET /api/v1/archived-workflows
ClusterWorkflowTemplateServiceApi createClusterWorkflowTemplate POST /api/v1/cluster-workflow-templates
ClusterWorkflowTemplateServiceApi deleteClusterWorkflowTemplate DELETE /api/v1/cluster-workflow-templates/{name}
ClusterWorkflowTemplateServiceApi getClusterWorkflowTemplate GET /api/v1/cluster-workflow-templates/{name}
ClusterWorkflowTemplateServiceApi lintClusterWorkflowTemplate POST /api/v1/cluster-workflow-templates/lint
ClusterWorkflowTemplateServiceApi listClusterWorkflowTemplates GET /api/v1/cluster-workflow-templates
ClusterWorkflowTemplateServiceApi updateClusterWorkflowTemplate PUT /api/v1/cluster-workflow-templates/{name}
CronWorkflowServiceApi createCronWorkflow POST /api/v1/cron-workflows/{namespace}
CronWorkflowServiceApi deleteCronWorkflow DELETE /api/v1/cron-workflows/{namespace}/{name}
CronWorkflowServiceApi getCronWorkflow GET /api/v1/cron-workflows/{namespace}/{name}
CronWorkflowServiceApi lintCronWorkflow POST /api/v1/cron-workflows/{namespace}/lint
CronWorkflowServiceApi listCronWorkflows GET /api/v1/cron-workflows/{namespace}
CronWorkflowServiceApi updateCronWorkflow PUT /api/v1/cron-workflows/{namespace}/{name}
EventServiceApi receiveEvent POST /api/v1/events/{namespace}/{discriminator}
InfoServiceApi getInfo GET /api/v1/info
InfoServiceApi getUserInfo GET /api/v1/userinfo
InfoServiceApi getVersion GET /api/v1/version
WorkflowServiceApi createWorkflow POST /api/v1/workflows/{namespace}
WorkflowServiceApi deleteWorkflow DELETE /api/v1/workflows/{namespace}/{name}
WorkflowServiceApi getWorkflow GET /api/v1/workflows/{namespace}/{name}
WorkflowServiceApi lintWorkflow POST /api/v1/workflows/{namespace}/lint
WorkflowServiceApi listWorkflows GET /api/v1/workflows/{namespace}
WorkflowServiceApi podLogs GET /api/v1/workflows/{namespace}/{name}/{podName}/log
WorkflowServiceApi resubmitWorkflow PUT /api/v1/workflows/{namespace}/{name}/resubmit
WorkflowServiceApi resumeWorkflow PUT /api/v1/workflows/{namespace}/{name}/resume
WorkflowServiceApi retryWorkflow PUT /api/v1/workflows/{namespace}/{name}/retry
WorkflowServiceApi setWorkflow PUT /api/v1/workflows/{namespace}/{name}/set
WorkflowServiceApi stopWorkflow PUT /api/v1/workflows/{namespace}/{name}/stop
WorkflowServiceApi submitWorkflow POST /api/v1/workflows/{namespace}/submit
WorkflowServiceApi suspendWorkflow PUT /api/v1/workflows/{namespace}/{name}/suspend
WorkflowServiceApi terminateWorkflow PUT /api/v1/workflows/{namespace}/{name}/terminate
WorkflowServiceApi watchEvents GET /api/v1/stream/events/{namespace}
WorkflowServiceApi watchWorkflows GET /api/v1/workflow-events/{namespace}
WorkflowTemplateServiceApi createWorkflowTemplate POST /api/v1/workflow-templates/{namespace}
WorkflowTemplateServiceApi deleteWorkflowTemplate DELETE /api/v1/workflow-templates/{namespace}/{name}
WorkflowTemplateServiceApi getWorkflowTemplate GET /api/v1/workflow-templates/{namespace}/{name}
WorkflowTemplateServiceApi lintWorkflowTemplate POST /api/v1/workflow-templates/{namespace}/lint
WorkflowTemplateServiceApi listWorkflowTemplates GET /api/v1/workflow-templates/{namespace}
WorkflowTemplateServiceApi updateWorkflowTemplate PUT /api/v1/workflow-templates/{namespace}/{name}

Documentation for Models

Code generation

The generated SDK will correspond to the argo version specified in the ARGO_VERSION file.

If you wish to generate code yourself, you can do so by reproducing the build environment (image): make builder_image, then running make builder_make to generate the client.

Project details


Release history Release notifications | RSS feed

This version

4.0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

argo-workflows-4.0.1.tar.gz (279.2 kB view details)

Uploaded Source

Built Distribution

argo_workflows-4.0.1-py3-none-any.whl (449.6 kB view details)

Uploaded Python 3

File details

Details for the file argo-workflows-4.0.1.tar.gz.

File metadata

  • Download URL: argo-workflows-4.0.1.tar.gz
  • Upload date:
  • Size: 279.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.11

File hashes

Hashes for argo-workflows-4.0.1.tar.gz
Algorithm Hash digest
SHA256 cb5d496085ffb7ec6ee071bd8c638a44c34a606f80c5a3188091730093d5c175
MD5 3a10f3c027740f12620b663fa9977fb9
BLAKE2b-256 30b09f8ef44f7b921398b27ac3a10473d4304d592ac00b02be94632977150654

See more details on using hashes here.

File details

Details for the file argo_workflows-4.0.1-py3-none-any.whl.

File metadata

  • Download URL: argo_workflows-4.0.1-py3-none-any.whl
  • Upload date:
  • Size: 449.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.11

File hashes

Hashes for argo_workflows-4.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5bc8b69dca7ddc2eafd5e4332f74e148f45b1f758ea65c47a2dca6fb3a619ff2
MD5 7d94c951a8f153fb2f25ec4b218129c9
BLAKE2b-256 f7af2c2bc33c1c353380d23df678ceda40cabaf607b90e0f4684cdf5ce6ff366

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page