Registry / http-networking / onvif-zeep-async

onvif-zeep-async

JSON →
library4.2.0pypypi✓ verified 84d ago

Async Python client for ONVIF cameras using zeep and aiohttp. Provides SOAP-based device discovery, media streaming, PTZ control, and event handling. Current version 4.0.4, requires Python >=3.10. Active development with frequent releases.

pip install onvif-zeep-async
INSTALL
IMPORT
SIG · ONVIF-ZEEP-ASYNC
O
onvif-zeep-async
http-networkingpythonv4.2.0
Install
5.6s avg
Import
1340ms
Disk
50MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 1.178s · 51.8MB
glibc
py 3.103.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())
Debug
Known issues
breakingv4.0.0 migrated from httplib2 to aiohttp for HTTP transport. Old code using custom httplib2 transport will break.
fix
Use aiohttp-based transport or upgrade to v4+ and adopt async/await pattern.
affects: >=4.0.0
breakingv4.0.0 requires Python >=3.10. Python 3.9 and older are not supported.
fix
Upgrade Python to 3.10+ or pin to onvif-zeep-async==3.2.5 (last Python 3.9 compatible version).
affects: >=4.0.0
deprecatedThe `update_xaddrs` parameter in ONVIFCamera constructor may be deprecated in future releases. Use `await camera.update_xaddrs()` explicitly.
fix
Prefer calling `await camera.update_xaddrs()` after initialization.
affects: *
gotchaONVIFCamera constructor does not connect immediately; you must await service creation methods. Attempting to use the camera before awaiting will cause runtime errors.
fix
Always use `await` with methods like `create_media_service()` and `update_xaddrs()`.
affects: *
gotchaSnapshot URIs returned by some cameras may be broken or missing authentication. The library tries to fetch snapshot URI without user/pass as fallback (since v3.2.4), but this may still fail.
fix
Manually construct snapshot URL with credentials if automatic fallback fails.
affects: *
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'onvif'
Installing wrong package or using wrong import name.
fix
Install `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.
fix
Ensure 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.
fix
Verify 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`.
fix
Prepend `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)
Agent activity
8 hits · last 30 days
node
6
Resources
onvif-zeep-async — pip install onvif-zeep-async · libregistry