Skip to main content

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


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)

Uploaded Source

Built Distribution

zabbix_enums-0.1.0-py3-none-any.whl (21.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page