Zenoss API client for python
Project description
# python-zenoss-client
[![PyPI version](https://img.shields.io/pypi/v/python-zenoss-client.svg)](https://pypi.python.org/pypi/python-zenoss-client)
[![Build Status](https://travis-ci.org/sayanarijit/python-zenoss-client.svg?branch=master)](https://travis-ci.org/sayanarijit/python-zenoss-client)
Zenoss API client for python
### Installation
```bash
pip install python-zenoss-client
```
### Usage
* Connect
```python
from zenoss_client import ZenossClient
api = ZenossClient(host="localhost", user="zenuser", passwd="*****")
```
* API call: The long way
```python
endpoint = api.endpoint('device_router')
action = endpoint.action('DeviceRouter')
method = action.method('getDevices')
method(params={'name': 'testdevice'})
```
* API call: The sorter way
```python
api.endpoint('device_router').action('DeviceRouter').method('getDevices')(params={'name': 'testdevice'})
```
* API call: The sortest way
```python
api.device_router.DeviceRouter.getDevices(params={'name': 'testdevice'})
```
### Documentation
This module is inspired by [json_api.sh](http://wiki.zenoss.org/Working_with_the_JSON_API#v5_version_of_the_json_api.sh) SHELL script published on [zenoss official wiki](http://wiki.zenoss.org)
For full documentation of zenoss API, kindly refer to the link below:
### [zenoss official documentation](https://www.zenoss.com/services-support/documentation/zenoss-json-api-0)
* Conventional naming of routers
```
Products.Zuul.routers.device -> device_router
Products.Zuul.routers.users -> users_router
Products.Zuul.routers.triggers -> triggers_router
```
[![PyPI version](https://img.shields.io/pypi/v/python-zenoss-client.svg)](https://pypi.python.org/pypi/python-zenoss-client)
[![Build Status](https://travis-ci.org/sayanarijit/python-zenoss-client.svg?branch=master)](https://travis-ci.org/sayanarijit/python-zenoss-client)
Zenoss API client for python
### Installation
```bash
pip install python-zenoss-client
```
### Usage
* Connect
```python
from zenoss_client import ZenossClient
api = ZenossClient(host="localhost", user="zenuser", passwd="*****")
```
* API call: The long way
```python
endpoint = api.endpoint('device_router')
action = endpoint.action('DeviceRouter')
method = action.method('getDevices')
method(params={'name': 'testdevice'})
```
* API call: The sorter way
```python
api.endpoint('device_router').action('DeviceRouter').method('getDevices')(params={'name': 'testdevice'})
```
* API call: The sortest way
```python
api.device_router.DeviceRouter.getDevices(params={'name': 'testdevice'})
```
### Documentation
This module is inspired by [json_api.sh](http://wiki.zenoss.org/Working_with_the_JSON_API#v5_version_of_the_json_api.sh) SHELL script published on [zenoss official wiki](http://wiki.zenoss.org)
For full documentation of zenoss API, kindly refer to the link below:
### [zenoss official documentation](https://www.zenoss.com/services-support/documentation/zenoss-json-api-0)
* Conventional naming of routers
```
Products.Zuul.routers.device -> device_router
Products.Zuul.routers.users -> users_router
Products.Zuul.routers.triggers -> triggers_router
```
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for python-zenoss-client-1.0.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e292474f4abb78885aaea8b5eeaa857eeed7aa5b21339572432e21ff9baa9cbd |
|
MD5 | 29ecffcc629ac2702d297b5c66665ae6 |
|
BLAKE2b-256 | a266b5f4634a1bbf029738197d94d3ac98f44d8fa3c0211e1ba27069247b9cbe |