Python client for Argo Workflows
Argo Version: 2.12.2
pip install argo-workflows
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.12.2/examples/dag-diamond-steps.yaml'
resp = requests.get(WORKFLOW)
manifest: dict = yaml.safe_load(resp.text)
service.create_workflow('argo', V1alpha1WorkflowCreateRequest(workflow=manifest))
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} |
- V1AzureDiskVolumeSource
- V1alpha1Arguments
- V1alpha1CronWorkflowSpec
- V1alpha1WorkflowSetRequest
- V1ConfigMapProjection
- V1Volume
- V1alpha1WorkflowLintRequest
- V1alpha1MetricLabel
- V1PortworxVolumeSource
- V1alpha1Histogram
- V1alpha1ArtifactoryArtifact
- V1alpha1ClusterWorkflowTemplateCreateRequest
- V1EnvVar
- V1SecretKeySelector
- V1StorageOSVolumeSource
- V1StatusDetails
- V1ObjectMeta
- V1alpha1WorkflowResubmitRequest
- V1alpha1ContinueOn
- V1alpha1Sequence
- V1alpha1WorkflowResumeRequest
- V1PodAffinityTerm
- V1alpha1ValueFrom
- V1ServiceAccountTokenProjection
- V1TypedLocalObjectReference
- V1alpha1LogEntry
- V1ISCSIVolumeSource
- V1EventSeries
- V1alpha1WorkflowTemplate
- V1TCPSocketAction
- V1Initializer
- V1NodeSelectorRequirement
- V1CreateOptions
- V1ConfigMapEnvSource
- V1VolumeDevice
- V1VolumeProjection
- V1DownwardAPIVolumeFile
- V1alpha1WorkflowStep
- V1PodDNSConfigOption
- V1PodDNSConfig
- V1alpha1UserContainer
- V1StatusCause
- V1Capabilities
- V1RBDVolumeSource
- V1HTTPGetAction
- V1OwnerReference
- V1alpha1ResourceTemplate
- V1Initializers
- V1alpha1WorkflowTemplateList
- V1alpha1Inputs
- V1alpha1DAGTemplate
- V1ExecAction
- V1alpha1CronWorkflowList
- V1alpha1WorkflowCreateRequest
- V1alpha1HDFSArtifact
- V1KeyToPath
- V1Event
- V1alpha1ClusterWorkflowTemplateList
- V1SELinuxOptions
- V1HostPathVolumeSource
- V1Sysctl
- V1ConfigMapKeySelector
- V1EmptyDirVolumeSource
- V1GlusterfsVolumeSource
- V1ContainerPort
- V1AWSElasticBlockStoreVolumeSource
- V1PreferredSchedulingTerm
- V1ObjectReference
- V1alpha1ScriptTemplate
- V1PodAntiAffinity
- V1NodeSelectorTerm
- V1EnvFromSource
- V1LabelSelectorRequirement
- V1ManagedFieldsEntry
- V1alpha1WorkflowEventBindingSpec
- V1alpha1MutexHolding
- V1alpha1S3Artifact
- V1ConfigMapVolumeSource
- V1alpha1CronWorkflow
- V1alpha1SubmitOpts
- V1PodAffinity
- V1alpha1Mutex
- V1Toleration
- V1alpha1Outputs
- V1CinderVolumeSource
- V1SecretProjection
- V1SecurityContext
- V1alpha1WorkflowRetryRequest
- V1GitRepoVolumeSource
- V1alpha1Metadata
- V1Status
- V1alpha1NodeSynchronizationStatus
- V1ScaleIOVolumeSource
- V1PersistentVolumeClaim
- V1alpha1Artifact
- V1alpha1NodeStatus
- V1FlexVolumeSource
- V1alpha1OSSArtifact
- V1alpha1WorkflowTemplateRef
- V1WeightedPodAffinityTerm
- V1alpha1ClusterWorkflowTemplateUpdateRequest
- V1alpha1Counter
- V1alpha1SemaphoreRef
- V1alpha1ArchiveStrategy
- V1alpha1WorkflowTemplateSpec
- V1EnvVarSource
- V1alpha1Synchronization
- V1alpha1Metrics
- V1AzureFileVolumeSource
- V1alpha1Event
- V1alpha1Memoize
- V1alpha1ClusterWorkflowTemplateLintRequest
- V1alpha1WorkflowList
- V1alpha1Gauge
- V1alpha1SemaphoreStatus
- V1GCEPersistentDiskVolumeSource
- V1alpha1RawArtifact
- V1alpha1ArtifactRepositoryRef
- V1ResourceFieldSelector
- V1PersistentVolumeClaimSpec
- V1alpha1Parameter
- V1PersistentVolumeClaimCondition
- V1Lifecycle
- V1alpha1PodGC
- V1alpha1LintCronWorkflowRequest
- V1DownwardAPIVolumeSource
- V1alpha1Workflow
- V1VolumeMount
- V1EventSource
- V1LabelSelector
- V1VsphereVirtualDiskVolumeSource
- V1alpha1TemplateRef
- V1alpha1CreateCronWorkflowRequest
- V1alpha1GitArtifact
- V1ProjectedVolumeSource
- V1SecretEnvSource
- V1PhotonPersistentDiskVolumeSource
- V1alpha1WorkflowWatchEvent
- V1alpha1DAGTask
- V1alpha1CronWorkflowStatus
- V1alpha1WorkflowSuspendRequest
- V1CSIVolumeSource
- V1alpha1Submit
- V1alpha1GCSArtifact
- V1alpha1HTTPArtifact
- V1alpha1Version
- V1Container
- V1alpha1ClusterWorkflowTemplate
- V1alpha1WorkflowTemplateUpdateRequest
- V1FCVolumeSource
- V1Affinity
- V1alpha1SemaphoreHolding
- V1alpha1TTLStrategy
- V1alpha1WorkflowSubmitRequest
- V1Handler
- V1HTTPHeader
- V1ListMeta
- V1alpha1SuspendTemplate
- V1alpha1WorkflowStatus
- V1alpha1WorkflowTemplateCreateRequest
- V1PersistentVolumeClaimStatus
- V1alpha1Link
- V1alpha1WorkflowSpec
- V1PersistentVolumeClaimVolumeSource
- V1ResourceRequirements
- V1FlockerVolumeSource
- V1NodeSelector
- V1alpha1ArtifactLocation
- V1alpha1InfoResponse
- V1alpha1TarStrategy
- V1alpha1WorkflowStopRequest
- V1ObjectFieldSelector
- V1NFSVolumeSource
- V1alpha1Condition
- V1CephFSVolumeSource
- V1alpha1ExecutorConfig
- V1alpha1Prometheus
- V1alpha1GetUserInfoResponse
- V1alpha1Backoff
- V1alpha1WorkflowEventBinding
- V1alpha1Template
- V1QuobyteVolumeSource
- V1PodSecurityContext
- V1WindowsSecurityContextOptions
- V1LocalObjectReference
- V1NodeAffinity
- V1HostAlias
- V1alpha1MemoizationStatus
- V1alpha1SynchronizationStatus
- V1alpha1UpdateCronWorkflowRequest
- V1SecretVolumeSource
- V1Probe
- V1alpha1Cache
- V1alpha1RetryStrategy
- V1alpha1WorkflowTemplateLintRequest
- V1alpha1WorkflowTerminateRequest
- V1alpha1MutexStatus
- V1DownwardAPIProjection
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.