Skip to main content

aiozabbix

aiozabbix is a Python package that provides an asynchronous interface to the Zabbix API, using aiohttp. It is based on PyZabbix.

Example usage

The interface mimics PyZabbix as closely as possible:

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:

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()

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiozabbix-1.4.0.tar.gz (33.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiozabbix-1.4.0-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file aiozabbix-1.4.0.tar.gz.

File metadata

  • Download URL: aiozabbix-1.4.0.tar.gz
  • Upload date:
  • Size: 33.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for aiozabbix-1.4.0.tar.gz
Algorithm Hash digest
SHA256 adedf811b5a26e0a237f2cf6d8d9435a91e1d4bda2e9ea759e851308d0e3c7ad
MD5 1a563455877766c9f93faa446bdf3613
BLAKE2b-256 06b86492c929038696a013e0ad7956f03dcd5fda61079f28d4ffd7c657f52bfa

See more details on using hashes here.

File details

Details for the file aiozabbix-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: aiozabbix-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 27.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for aiozabbix-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 23ffc4edfe650c0464788a45b68ed2c7b527254adb091614619db753139098db
MD5 a31fb30251994613c03b7d07ccb7f5bd
BLAKE2b-256 b41e179f94554712062b24e16de26626b9bbcb3365a8ec1d0f86d0312e5a8479

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.4.0 This release

2 files

1.3.1

2 files

1.3.0

2 files

1.2.0

2 files

1.1.2

2 files

1.1.1

1 file

1.1.0

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page