Awx: Add examples in documentation on how to use awxkit from Python

Created on 12 Sep 2020  路  3Comments  路  Source: ansible/awx

ISSUE TYPE

  • Improve awxkit documentation
SUMMARY

tower-cli had examples on how to use it from Python: https://tower-cli.readthedocs.io/en/latest/quickstart.html

import tower_cli

res = tower_cli.get_resource('job_template')
jt_list = res.list()
tower_cli.get_resource('job').launch(job_template=1, monitor=True)

I couldn't find how to do the equivalent using awxkit. Looking at the code didn't give me an obvious answer either.
Some simple examples would really help.

Most helpful comment

hi @beenje, your request is exactly what I was looking for. I wrote bunch of python code based on tower-cli, but since tower-cli is not maintained by the community we need to move to awxkit and port our code to the new tool.

@ryanpetrello I was wondering if creating python interface is part of the future plan for awxkit,
cheers !

All 3 comments

Hey @beenje,

awxkit doesn't generally have a programmatic interface that's strives for long-term stability in the way that tower_cli did, so we don't really have documentation like this.

That's a bit sad to hear. It was easy to integrate tower-cli in Python applications. I was hoping the same would be true with awxkit.
Maybe later on the roadmap?
Anyway, I'll close this issue then. Thanks.

hi @beenje, your request is exactly what I was looking for. I wrote bunch of python code based on tower-cli, but since tower-cli is not maintained by the community we need to move to awxkit and port our code to the new tool.

@ryanpetrello I was wondering if creating python interface is part of the future plan for awxkit,
cheers !

Was this page helpful?
0 / 5 - 0 ratings