<commit_before>[![Build Status](https://travis-ci.org/chelnak/vRAAPIClient.svg?branch=master)](https://travis-ci.org/chelnak/vRAAPIClient)

vRAAPIClient
============

A python wrapper for the vRealize Automation REST API

- ConsumerAPI client: Request and view resources
- ReservationServiceAPI client: Create and view reservations

Returns API responses in JSON format

Dependencies:
===========
- requests: http://docs.python-requests.org/en/latest/
- prettytable https://code.google.com/p/prettytable/

Basic usage:
============
Consumer API:
-------------
```
#!/usr/bin/python
import getpass
import json

from vraapiclient import catalog

url = ''
usr = ''
passwd = <PASSWORD>()

#Create a new consumer API client
client = catalog.ConsumerClient(url, usr, passwd)

#print out a table of all entitled catalog items for the current user
client.getEntitledCatalogItems()
```

Reservation Service API:
------------------------
```
#!/usr/bin/python
import getpass
import json

from vraapiclient import reservation

url = ''
usr = ''
passwd = <PASSWORD>()

client = client.ReservationClient(url, usr, passwd)

client.getAllReservations()
```

TODO:
====
- Need to add a full example of using JINGA2 templating and the reservation client
- Create provider class
- Create admin class
- Better error handling
- Boolean support with jinja?
- Better docs

Change log:
===========
01/06/2015
- Added setup.py to make installation easier
- Moved to a module based structure
- More code cleanups

06/05/2015:
- Added: Reservation service API client based on the steps here -> http://pubs.vmware.com/vra-62/index.jsp#com.vmware.vra.programming.doc/GUID-11510887-0F55-4EA4-858C-9881F94C718B.html
- Reservation_example.py and templates/vsphere_reservation.json. Contains examples of how to use the vRAAPIAPIReservationClient with jinja2 templates<commit_msg>Preparing for read the docs<commit_after>[![Build Status](https://travis-ci.org/chelnak/vRAAPIClient.svg?branch=master)](https://travis-ci.org/chelnak/vRAAPIClient)

Welcome to vRAAPIClient
============

A python wrapper for the vRealize Automation REST API

- ConsumerAPI client: Request and view resources
- ReservationServiceAPI client: Create and view reservations

Returns API responses in JSON format

Dependencies
===========
- requests: http://docs.python-requests.org/en/latest/
- prettytable https://code.google.com/p/prettytable/

Basic usage
============
Consumer API
-------------
```
#!/usr/bin/python
import getpass
import json

from vraapiclient import catalog

url = ''
usr = ''
passwd = <PASSWORD>()

#Create a new consumer API client
client = catalog.ConsumerClient(url, usr, passwd)

#print out a table of all entitled catalog items for the current user
client.getEntitledCatalogItems()
```

Reservation Service API
------------------------
```
#!/usr/bin/python
import getpass
import json

from vraapiclient import reservation

url = ''
usr = ''
passwd = <PASSWORD>()

client = client.ReservationClient(url, usr, passwd)

client.getAllReservations()
```

TODO
====
- Need to add a full example of using JINGA2 templating and the reservation client
- Create provider class
- Create admin class
- Better error handling
- Boolean support with jinja?
- Better docs

Change log
===========
01/06/2015
- Added setup.py to make installation easier
- Moved to a module based structure
- More code cleanups

06/05/2015
- Added: Reservation service API client based on the steps here -> http://pubs.vmware.com/vra-62/index.jsp#com.vmware.vra.programming.doc/GUID-11510887-0F55-4EA4-858C-9881F94C718B.html
- Reservation_example.py and templates/vsphere_reservation.json. Contains examples of how to use the vRAAPIAPIReservationClient with jinja2 templates
{'fraction_non_alphanumeric': 0.13604525862068967, 'fraction_numerical': 0.024245689655172414, 'mean_word_length': 4.311874105865522, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1708164', 'n_tokens_mistral': 1200, 'n_tokens_neox': 1124, 'n_words': 347}