An Enum collection for Zabbix API scripting
Project description
zabbix-enums
Zabbix enumerations for API scripting.
This package aims to provide enumerations for Zabbix object parameters. So instead of using bare numbers and constantly browsing the docs, you can just use a nice enum.
Take the following code as an example:
from zabbix_enums.z54 import TriggerState
from pyzabbix import ZabbixAPI
zapi = ZabbixAPI('http://localhost')
zapi.login('Admin', 'zabbix')
# this
unknown_triggers = zapi.trigger.get(filter={'state': 1})
# becomes this
unknown_triggers = zapi.trigger.get(filter={'state': TriggerState.UNKNOWN})
Limitations
Please bare in mind that not all enumerations are present at this time.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zabbix-enums-0.1.0.tar.gz
(10.3 kB
view hashes)
Built Distribution
Close
Hashes for zabbix_enums-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c28b938626b563c42676ad838cde45940b27a4d7f36f2384eb3371d5410d2b34 |
|
MD5 | bb4c1c7a809b040a47b6e4d91424925d |
|
BLAKE2b-256 | ba7ce34266fa97ab24b481ef2cebb47d90d2427e74436473d47ca2633b313fae |