{"id":21641,"library":"onvif-zeep-async","title":"ONVIF Zeep Async","description":"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.","status":"active","version":"4.0.4","language":"python","source_language":"en","source_url":"https://github.com/hunterjm/python-onvif-zeep-async","tags":["onvif","camera","async","zeep","aiohttp","soap"],"install":[{"cmd":"pip install onvif-zeep-async","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"HTTP transport (used since v4.0.0)","package":"aiohttp","optional":false},{"reason":"SOAP client","package":"zeep","optional":false},{"reason":"Deprecated transport (pre-v4.0.0)","package":"httplib2","optional":true}],"imports":[{"note":"Top-level package is 'onvif', not 'onvif_zeep_async'","wrong":"from onvif_zeep_async import ONVIFCamera","symbol":"ONVIFCamera","correct":"from onvif import ONVIFCamera"}],"quickstart":{"code":"import asyncio\nfrom onvif import ONVIFCamera\n\nasync def main():\n    # create ONVIFCamera instance\n    ip = os.environ.get('CAMERA_IP', '192.168.1.100')\n    username = os.environ.get('CAMERA_USER', 'admin')\n    password = os.environ.get('CAMERA_PASS', 'admin')\n    camera = ONVIFCamera(ip, 80, username, password)\n    # get services\n    media_service = await camera.create_media_service()\n    # get profiles\n    profiles = await media_service.GetProfiles()\n    print(profiles)\n\nasyncio.run(main())","lang":"python","description":"Discover ONVIF device and list media profiles."},"warnings":[{"fix":"Use aiohttp-based transport or upgrade to v4+ and adopt async/await pattern.","message":"v4.0.0 migrated from httplib2 to aiohttp for HTTP transport. Old code using custom httplib2 transport will break.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Upgrade Python to 3.10+ or pin to onvif-zeep-async==3.2.5 (last Python 3.9 compatible version).","message":"v4.0.0 requires Python >=3.10. Python 3.9 and older are not supported.","severity":"breaking","affected_versions":">=4.0.0"},{"fix":"Prefer calling `await camera.update_xaddrs()` after initialization.","message":"The `update_xaddrs` parameter in ONVIFCamera constructor may be deprecated in future releases. Use `await camera.update_xaddrs()` explicitly.","severity":"deprecated","affected_versions":"*"},{"fix":"Always use `await` with methods like `create_media_service()` and `update_xaddrs()`.","message":"ONVIFCamera constructor does not connect immediately; you must await service creation methods. Attempting to use the camera before awaiting will cause runtime errors.","severity":"gotcha","affected_versions":"*"},{"fix":"Manually construct snapshot URL with credentials if automatic fallback fails.","message":"Snapshot 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.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Install `onvif-zeep-async` and import as `from onvif import ONVIFCamera`.","cause":"Installing wrong package or using wrong import name.","error":"ModuleNotFoundError: No module named 'onvif'"},{"fix":"Ensure system clock is synchronized (NTP) and retry. The library adds a timestamp automatically.","cause":"Camera requires WS-UsernameToken authentication with strict timestamp checking.","error":"zeep.exceptions.SignatureVerificationFailed: Failed to verify signature"},{"fix":"Verify camera IP and port, and ensure network connectivity.","cause":"Camera not reachable or wrong IP/port.","error":"aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 192.168.1.100:80"},{"fix":"Prepend `await` to the call: `media_service = await camera.create_media_service()`.","cause":"Calling `camera.create_media_service()` without `await`.","error":"TypeError: object NoneType can't be used in 'await' expression"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}