Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sayanarijit/python-zenoss-client
Zenoss API client for python
https://github.com/sayanarijit/python-zenoss-client
json-api zenoss zenoss-api
Last synced: 17 days ago
JSON representation
Zenoss API client for python
- Host: GitHub
- URL: https://github.com/sayanarijit/python-zenoss-client
- Owner: sayanarijit
- License: mit
- Created: 2018-02-27T07:23:45.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-05-23T02:03:47.000Z (over 1 year ago)
- Last Synced: 2024-09-22T16:08:23.918Z (about 2 months ago)
- Topics: json-api, zenoss, zenoss-api
- Language: Python
- Size: 12.7 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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 ZenossClientapi = 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'})
```* With timeout
```python
api.device_router.DeviceRouter.getDevices(params={'name': 'testdevice'}, timeout=10)
```### 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
```