Giter VIP home page Giter VIP logo

pyawx-client's Introduction

pyawx-client

A python library for interacting with Ansible AWX instances

Unittest - master

Installation

You can install from pypi using pip bash pip install pyawx-client

Usage

AWX provides an API v2 for interacting with it. Most of the API is supported but keep in mind this is in alpha and not everything will be built yet

The Client object sort of works in the idea of SQLAlchemy... at least for now.

Also, please be aware that models, or the python API could change since this project is still in Apha.

Get a list of Jobs

from pyawx import Client
from pyawx.models.jobs import Job

client = Client("https://awx.mycompany.com", username="me", password="password")

jobs = client.get_data(Job)

Create a job template

from pyawx import Client
from pyawx.models.jobs import JobTemplate

client = Client("https://awx.mycompany.com", username="me", password="password")

new_job = JobTemplate(name="My Job", description="Do some stuff", project=1)

client.add(new_job)
client.commit()

Delete a job template

from pyawx import Client
from pyawx.models.jobs import JobTemplate

client = Client("https://awx.mycompany.com", username="me", password="password")

job_template = client.get_data(JobTemplate)[0]

client.delete(job_template)
client.commit()

pyawx-client's People

Contributors

minsis avatar piknik1990 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

piknik1990

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.