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.0.8.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for zabbix_enums-0.0.8-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 646383a0d0c26945788e9f442bbf1368a80bc1ffada587a8d7f3d9052e4057fb |
|
MD5 | c26c737401f7f65ed89760c322a40480 |
|
BLAKE2b-256 | f2901b2085f2ab1dc286ec538d2af8c4e477c51482b5cb5e3a37566a73ca83ce |