Install & Compatibility
Where this runs
tested against v4.2.0 · 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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 1.178s · 51.8MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 5.6s · import 0.966s · 54MB
50MB installed
● package 50MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ONVIFCamera
✓ from onvif import ONVIFCamera
✗ from onvif_zeep_async import ONVIFCamera
Top-level package is 'onvif', not 'onvif_zeep_async'
Discover ONVIF device and list media profiles.
import asyncio
from onvif import ONVIFCamera
async def main():
# create ONVIFCamera instance
ip = os.environ.get('CAMERA_IP', '192.168.1.100')
username = os.environ.get('CAMERA_USER', 'admin')
password = os.environ.get('CAMERA_PASS', 'admin')
camera = ONVIFCamera(ip, 80, username, password)
# get services
media_service = await camera.create_media_service()
# get profiles
profiles = await media_service.GetProfiles()
print(profiles)
asyncio.run(main())
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'onvif'
Installing wrong package or using wrong import name.
fixInstall `onvif-zeep-async` and import as `from onvif import ONVIFCamera`.
zeep.exceptions.SignatureVerificationFailed: Failed to verify signature
Camera requires WS-UsernameToken authentication with strict timestamp checking.
fixEnsure system clock is synchronized (NTP) and retry. The library adds a timestamp automatically.
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.1.100:80
Camera not reachable or wrong IP/port.
fixVerify camera IP and port, and ensure network connectivity.
TypeError: object NoneType can't be used in 'await' expression
Calling `camera.create_media_service()` without `await`.
fixPrepend `await` to the call: `media_service = await camera.create_media_service()`.
Upgrade
Version history
4.2.0latest on PyPI · released Jun 3, 2026
Audit
Dependencies
aiohttprequiredHTTP transport (used since v4.0.0)
zeeprequiredSOAP client
httplib2optionalDeprecated transport (pre-v4.0.0)