- Notifications
You must be signed in to change notification settings - Fork8
Python client for Argo Workflows | Mirrored tohttps://github.com/argoproj-labs/argo-client-python
License
CermakM/argo-client-python
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Python client for Argo Workflows
pip install argo-workflows
If you're familiar with Kubernetes client, the Argo client follows the same behaviour.
fromargo.workflows.clientimportV1alpha1Apifromargo.workflows.configimportload_kube_configload_kube_config()# loads local configuration from ~/.kube/config
And to list Workflows from a namespace (sayargo):
v1alpha1=V1alpha1Api()wfs=v1alpha1.list_namespaced_workflows(namespace="argo")
To submit aWorkflow, one would simply load it from a YAML* and submit it as such:
importrequestsimportyamlnamespace="argo"# hello-world exampleresp=requests.get("https://raw.githubusercontent.com/argoproj/argo/master/examples/hello-world.yaml")resp.raise_for_status()manifest:dict=yaml.safe_load(resp.text)# Submit the Workflow to the `argo` namespacev1alpha1.create_namespaced_workflow(namespace,manifest)
* When working on a higher level of abstraction, check out theArgo Python DSL
The client is generated from the Argo and Kubernetes OpenAPI specification.
We follow semantic versioning, the client starts at version1.0 which matches Argo release2.3.0 and continues onwards.
| Argo 2.3 | Argo 2.4 | Argo 2.5 | |
|---|---|---|---|
| client-python 1.0 | ✓ | - | - |
| client-python 2.0 | + | ✓ | - |
| client-python 3.0 | + | + | ✓ |
Key:
✓Exactly the same features / API objects in both client-python and the Kubernetesversion.+client-python has features or api objects that may not be present in theKubernetes cluster, but everything they have in common will work.-The Kubernetes cluster has features the client-python library can't use(additional API objects, etc).
We try to be consistent with Argo as much as possible and hence we created special branches for user convenience --- for exampleargo/v2.4.0 is identical with Argo releasev2.4.0.
These can be then installed directly from github:
pip install -e "git+git://github.com/CermakM/argo-client-python@argo/v2.4.0#egg=argo-workflows"
⚠️ The compatibility for such cases is not guaranteed
If you wish to generate code yourself, you can do so by runningmake generate with theARGO_VERSION environment variable being set to the you want to generate the client for.
in the Makefile:
- make sure to select a compatible
KUBERNETES_BRANCHaccording to Argo'sGopkg.toml - make sure to select a compatible version ofkubernetes-client
- updaterequirements.txt andPipfile
For additional configuration check out theMakefile.
About
Python client for Argo Workflows | Mirrored tohttps://github.com/argoproj-labs/argo-client-python
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.