Registry / devops / py-zabbix

py-zabbix

JSON →
library1.1.7pypypi✓ verified 91d ago

Python module to work with Zabbix API and send trapper data. Version 1.1.7. Low release cadence, maintained sporadically.

pip install py-zabbix
INSTALL
IMPORT
SIG · PY-ZABBIX
P
py-zabbix
devopspythonv1.1.7
Install
1.5s avg
Import
135ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v1.1.7 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.142s · 17.9MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 1.5s · import 0.128s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ZabbixAPI
✓ from pyzabbix import ZabbixAPI
✗ from py_zabbix import ZabbixAPI
Hyphen in library name but underscore in Python package
ZabbixMetric
✓ from pyzabbix import ZabbixMetric
ZabbixSender
✓ from pyzabbix import ZabbixSender

Connect to Zabbix API and print the API version.

from pyzabbix import ZabbixAPI zapi = ZabbixAPI('http://zabbix.example.com') zapi.login('user', 'password') print('Connected to Zabbix API version %s' % zapi.api_version())
Debug
Known issues
gotchaPackage name on PyPI has a hyphen (py-zabbix), but Python import uses underscore (pyzabbix).
fix
Use 'from pyzabbix import ...' (no hyphen).
affects: all
deprecatedLogin method ZabbixAPI.login() accepts username and password in plain text; API tokens not natively supported in older versions.
fix
Use ZabbixAPI(token='...') constructor parameter if available (v1.1.7+).
affects: <1.1.7
gotchaZabbixSender must have correct chunk_size for large data. Default may cause errors.
fix
Explicitly set chunk_size when creating ZabbixSender object.
affects: >=1.1.3
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pyzabbix'
Installed py-zabbix but imported with wrong name or not installed.
fix
Run 'pip install py-zabbix' and import as 'from pyzabbix import ...'.
zabbix.api.ZabbixAPIException: Invalid JSON. Check Zabbix server version.
Using JSON-RPC call with incompatible Zabbix version or malformed request.
fix
Ensure Zabbix server version matches py-zabbix supported versions; check API endpoint URL.
AttributeError: module 'pyzabbix' has no attribute 'ZabbixSender'
Older version of py-zabbix without ZabbixSender class.
fix
Upgrade py-zabbix to 1.1.3+ with 'pip install --upgrade py-zabbix'.
Upgrade
Version history
1.1.7latest on PyPI · released Apr 29, 2020
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
12
Amazon
1
Resources
py-zabbix — pip install py-zabbix · libregistry