Skip to content

v0.2.0 — 2025-10-29

Choose a tag to compare

@kaburagisec kaburagisec released this 29 Oct 10:48
· 44 commits to main since this release
Immutable release. Only release title and notes can be modified.

PyPI

https://pypi.org/project/onvif-python/0.2.0 (18905306205)

Feat

  • [Client] Add comprehensive logging to ONVIF client, operator, and utils class (1458d93)
  • [Client] Enhance logging for type creation and nested initialization in ONVIFOperator (4af7281)
  • [Client] Improve local IP retrieval logging in ONVIFDiscovery class (83d90f4)
  • [Client] Add method handler operations() to list available methods for ONVIFService (a2ae678)
  • [Client] Add desc() method to retrieve documentation and parameters for ONVIF operations (80b70b4)
  • [CLI] Add product search functionality with pagination support (07546bd)
  • Add companies and products database files and update package data inclusion (79499de)

Fix/Refactor

  • [Client] Filter all urllib3 warnings to show only once for cleaner output (5747186)
  • [CLI] Remove unused truncate_output function in utils (b9497bd)
  • [CLI] Skip helper methods in get_service_methods and updated related documentation (2491270)
  • Organize assets project and add ONVIF DB (61b0031)
  • [CLI] Change --search/-s command to --filter/-f in discovery mode (f814814)
  • [CLI] Rename filter parameter to filter_term for clarity in device discovery (1cd7465)
  • [Client] Enhance logging by adding service_name in ONVIFOperator (f68e8a0)
  • [CLI] Correct pagination display in search_products function (9e41613)

Docs

  • Update image paths in README files to correct path (8024e80)
  • [Examples] Update docstring to clarify patch applicability for device discovery example (a187e78)
  • [Examples] Add comprehensive logging demonstration script for ONVIF operations (b450f41)
  • [Release] Bump version 0.1.9 → 0.2.0 (100dea1)

Full Changelog: v0.1.9...v0.2.0

Breaking Changes

  • There are numerous logging additions across various classes and operations in this library (1458d93) (4af7281). Considering that the previous release didn't use any logging functionality at all, this release includes logging for all core classes. An example of how to handle onvif logging is in this script logger.py. Or a simple example of its use is like this:

    Example usage:

    import logging
    from onvif import ONVIFClient
    
    # This will log from root
    logging.basicConfig(
        level=logging.INFO,
        format='%(asctime)s - %(name)s - %(levelname)s - %(message)s'
    )
    
    # This will specifically log from 'onvif' logger
    onvif_logger = logging.getLogger('onvif')
    onvif_logger.setLevel(logging.INFO) # Set level of 'onvif' logger (INFO, WARNING, ERROR, or DEBUG)
    
    # Initiate client
    client = ONVIFClient('192.168.1.17', 8000, 'admin', 'password', wsdl_dir=r"F:\Projects\python-onvif-zeep\wsdl")
    service = client.devicemgmt()
    print(service.GetDeviceInformation())

    Example output log:

    2025-10-29 17:53:14,679 - onvif.client - INFO - Initializing ONVIF client for 192.168.1.17:8000
    2025-10-29 17:53:14,679 - onvif.utils.wsdl - INFO - Setting custom WSDL directory: F:\Projects\python-onvif-zeep\wsdl
    2025-10-29 17:53:14,755 - onvif.operator - INFO - ONVIFOperator initialized {http://www.onvif.org/ver10/device/wsdl}DeviceBinding at http://192.168.1.17:8000/onvif/device_service
    2025-10-29 17:53:17,045 - onvif.client - INFO - Found 9 services via GetServices
    
  • Device discovery with specific keyword filtering based on scope/type has now changed from using the command --search/-s to --filter/-f (f814814) like this:

    Before this release:

    onvif --discover --search "C210" --interactive
    

    After this release:

    onvif --discover --filter "C210" --interactive
    
  • The --search/-s command remains in the ONVIF CLI, but is used to search for products in the database, rather than as a filter parameter for device discovery (07546bd).

    Example usage:

    # Search by model name
    onvif --search "C210"
    onvif -s "axis camera"
    
    # Search by manufacturer
    onvif --search "hikvision"
    onvif -s "dahua"
    
    # Search by any keyword
    onvif --search "ptz"
    onvif -s "thermal"
    

    Example output:

    Found 15 product(s) matching: hikvision
    Showing 1-10 of 15 results
    
    ID  | Test Date           | Model             | Firmware | Profiles | Category | Type    | Company
    ----|---------------------|-------------------|----------|----------|----------|---------|---------
    342 | 2024-08-15 17:53:12 | DS-2CD2143G2-IU   | V5.7.3   | S,G,T    | Camera   | device  | Hikvision
    341 | 2024-08-14 14:22:05 | DS-2DE2A404IW-DE3 | V5.6.15  | S,G,T    | Camera   | device  | Hikvision
    ...
    
    Page 1 of 2
    Navigation: Next: --page 2