aiozabbix
=========
**aiozabbix** is a Python package that provides an asynchronous
interface to the
[Zabbix API](https://www.zabbix.com/documentation/3.0/manual/api/reference),
using aiohttp. It is based on
[PyZabbix](https://github.com/lukecyca/pyzabbix).
Example usage
-------------
The interface mimics PyZabbix as closely as possible:
```python
import asyncio
from aiozabbix import ZabbixAPI
async def main():
zapi = ZabbixAPI('https://zabbixserver.example.com/zabbix')
await zapi.login('zabbix user')
hosts = await zapi.host.get(output=['host', 'hostid', 'name', 'status'])
print(hosts)
if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.close()
```
To customize the HTTP requests, for example to perform HTTP basic
authentication, you need to provide your own `aiohttp.ClientSession`:
```python
import asyncio
import aiohttp
from aiozabbix import ZabbixAPI
async def main():
auth = aiohttp.BasicAuth('zabbix user', password='zabbix password')
async with aiohttp.ClientSession(auth=auth) as session:
zapi = ZabbixAPI('https://zabbixserver.example.com/zabbix', client_session=session)
await zapi.login('zabbix user')
hosts = await zapi.host.get(output=['host', 'hostid', 'name', 'status'])
print(hosts)
if __name__ == '__main__':
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.close()
```
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/ModioAB/aiozabbix",
"name": "aiozabbix",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "zabbix monitoring api",
"author": "Modio AB",
"author_email": "nili@modio.se",
"download_url": "https://files.pythonhosted.org/packages/d7/e9/16237cba05e4a435614122dbd565faa62db951b7e58cabb0c7b44d8d4d03/aiozabbix-1.2.0.tar.gz",
"platform": null,
"description": "aiozabbix\n=========\n\n**aiozabbix** is a Python package that provides an asynchronous\ninterface to the\n[Zabbix API](https://www.zabbix.com/documentation/3.0/manual/api/reference),\nusing aiohttp. It is based on\n[PyZabbix](https://github.com/lukecyca/pyzabbix).\n\nExample usage\n-------------\n\nThe interface mimics PyZabbix as closely as possible:\n\n```python\nimport asyncio\n\nfrom aiozabbix import ZabbixAPI\n\n\nasync def main():\n zapi = ZabbixAPI('https://zabbixserver.example.com/zabbix')\n await zapi.login('zabbix user')\n hosts = await zapi.host.get(output=['host', 'hostid', 'name', 'status'])\n print(hosts)\n\n\nif __name__ == '__main__':\n loop = asyncio.get_event_loop()\n loop.run_until_complete(main())\n loop.close()\n```\n\nTo customize the HTTP requests, for example to perform HTTP basic\nauthentication, you need to provide your own `aiohttp.ClientSession`:\n\n```python\nimport asyncio\n\nimport aiohttp\nfrom aiozabbix import ZabbixAPI\n\n\nasync def main():\n auth = aiohttp.BasicAuth('zabbix user', password='zabbix password')\n async with aiohttp.ClientSession(auth=auth) as session:\n zapi = ZabbixAPI('https://zabbixserver.example.com/zabbix', client_session=session)\n await zapi.login('zabbix user')\n hosts = await zapi.host.get(output=['host', 'hostid', 'name', 'status'])\n print(hosts)\n\n\nif __name__ == '__main__':\n loop = asyncio.get_event_loop()\n loop.run_until_complete(main())\n loop.close()\n```\n",
"bugtrack_url": null,
"license": "LGPL",
"summary": "Asynchronous Zabbix API Python interface",
"version": "1.2.0",
"split_keywords": [
"zabbix",
"monitoring",
"api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "8e5b44602515fa42b278bbfb0e38813385c51a8954d1a87d89c63c3f43460b3d",
"md5": "776ea2bc895e89de539c32cc7ae57781",
"sha256": "aea60768de7abd1953f3d6dd1d50d3f0e5f6bfa32f539c21f06d03b2f0d42873"
},
"downloads": -1,
"filename": "aiozabbix-1.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "776ea2bc895e89de539c32cc7ae57781",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 16960,
"upload_time": "2023-01-04T15:05:43",
"upload_time_iso_8601": "2023-01-04T15:05:43.534441Z",
"url": "https://files.pythonhosted.org/packages/8e/5b/44602515fa42b278bbfb0e38813385c51a8954d1a87d89c63c3f43460b3d/aiozabbix-1.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d7e916237cba05e4a435614122dbd565faa62db951b7e58cabb0c7b44d8d4d03",
"md5": "b625a9ce5c5dd3cc3fcea21d5ac16958",
"sha256": "3d27778ef56618a5a599d26ea3b278b9475e253b84261c1a7ba575261c154bc6"
},
"downloads": -1,
"filename": "aiozabbix-1.2.0.tar.gz",
"has_sig": false,
"md5_digest": "b625a9ce5c5dd3cc3fcea21d5ac16958",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 16180,
"upload_time": "2023-01-04T15:05:45",
"upload_time_iso_8601": "2023-01-04T15:05:45.278253Z",
"url": "https://files.pythonhosted.org/packages/d7/e9/16237cba05e4a435614122dbd565faa62db951b7e58cabb0c7b44d8d4d03/aiozabbix-1.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-04 15:05:45",
"github": false,
"gitlab": true,
"bitbucket": false,
"gitlab_user": "ModioAB",
"gitlab_project": "aiozabbix",
"lcname": "aiozabbix"
}