onvif-python 0.2.7__py3-none-any.whl → 0.2.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- onvif/__init__.py +1 -1
- onvif/utils/service.py +27 -0
- {onvif_python-0.2.7.dist-info → onvif_python-0.2.9.dist-info}/METADATA +4 -4
- {onvif_python-0.2.7.dist-info → onvif_python-0.2.9.dist-info}/RECORD +8 -8
- {onvif_python-0.2.7.dist-info → onvif_python-0.2.9.dist-info}/WHEEL +0 -0
- {onvif_python-0.2.7.dist-info → onvif_python-0.2.9.dist-info}/entry_points.txt +0 -0
- {onvif_python-0.2.7.dist-info → onvif_python-0.2.9.dist-info}/licenses/LICENSE.md +0 -0
- {onvif_python-0.2.7.dist-info → onvif_python-0.2.9.dist-info}/top_level.txt +0 -0
onvif/__init__.py
CHANGED
onvif/utils/service.py
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# onvif/utils/service.py
|
|
2
2
|
|
|
3
3
|
import logging
|
|
4
|
+
import zeep.helpers
|
|
4
5
|
from .exceptions import ONVIFOperationException
|
|
5
6
|
|
|
6
7
|
logger = logging.getLogger(__name__)
|
|
@@ -118,6 +119,32 @@ class ONVIFService:
|
|
|
118
119
|
|
|
119
120
|
return wrapped_method
|
|
120
121
|
|
|
122
|
+
def to_dict(self, zeep_object):
|
|
123
|
+
"""
|
|
124
|
+
Convert a zeep object (result from ONVIF operation) to Python dictionary.
|
|
125
|
+
|
|
126
|
+
Args:
|
|
127
|
+
zeep_object: The zeep object returned from ONVIF operations
|
|
128
|
+
|
|
129
|
+
Returns:
|
|
130
|
+
dict: Python dictionary representation of the zeep object
|
|
131
|
+
|
|
132
|
+
Example:
|
|
133
|
+
device = client.devicemgmt()
|
|
134
|
+
|
|
135
|
+
info = device.GetDeviceInformation()
|
|
136
|
+
info_dict = device.to_dict(info)
|
|
137
|
+
print(info_dict)
|
|
138
|
+
|
|
139
|
+
profiles = media.GetProfiles()
|
|
140
|
+
profiles_dict = device.to_dict(profiles)
|
|
141
|
+
"""
|
|
142
|
+
try:
|
|
143
|
+
return {} if zeep_object is None else zeep.helpers.serialize_object(zeep_object)
|
|
144
|
+
except Exception as e:
|
|
145
|
+
logger.error(f"Failed to convert zeep object to dict: {e}")
|
|
146
|
+
return {}
|
|
147
|
+
|
|
121
148
|
def type(self, type_name: str):
|
|
122
149
|
"""
|
|
123
150
|
Create and return an instance of the specified ONVIF type.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: onvif-python
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.9
|
|
4
4
|
Summary: A modern Python library for ONVIF-compliant devices
|
|
5
5
|
Author-email: Nirsimetri Technologies® <open@nirsimetri.com>
|
|
6
6
|
Maintainer: Kaburagi
|
|
@@ -46,7 +46,7 @@ Dynamic: license-file
|
|
|
46
46
|
<div align="center">
|
|
47
47
|
<a href="https://app.codacy.com/gh/nirsimetri/onvif-python/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade"><img src="https://app.codacy.com/project/badge/Grade/bff08a94e4d447b690cea49c6594826d"/></a>
|
|
48
48
|
<a href="https://deepwiki.com/nirsimetri/onvif-python"><img alt="Ask DeepWiki" src="https://deepwiki.com/badge.svg"></a>
|
|
49
|
-
<a href="https://pypi.org/project/onvif-python/"><img alt="PyPI Version" src="https://img.shields.io/badge/PyPI-0.2.
|
|
49
|
+
<a href="https://pypi.org/project/onvif-python/"><img alt="PyPI Version" src="https://img.shields.io/badge/PyPI-0.2.9-orange?logo=archive&color=yellow"></a>
|
|
50
50
|
<a href="https://pepy.tech/projects/onvif-python"><img alt="Pepy Total Downloads" src="https://img.shields.io/pepy/dt/onvif-python?label=Downloads&color=red"></a>
|
|
51
51
|
<br>
|
|
52
52
|
<a href="https://github.com/nirsimetri/onvif-python/actions/workflows/python-app.yml"><img alt="Build" src="https://github.com/nirsimetri/onvif-python/actions/workflows/python-app.yml/badge.svg?branch=main"></a>
|
|
@@ -362,7 +362,7 @@ usage: onvif [-h] [--host HOST] [--port PORT] [--username USERNAME] [--password
|
|
|
362
362
|
[--cache {all,db,mem,none}] [--health-check-interval HEALTH_CHECK_INTERVAL] [--output OUTPUT] [--version]
|
|
363
363
|
[service] [method] [params ...]
|
|
364
364
|
|
|
365
|
-
ONVIF Terminal Client — v0.2.
|
|
365
|
+
ONVIF Terminal Client — v0.2.9
|
|
366
366
|
https://github.com/nirsimetri/onvif-python
|
|
367
367
|
|
|
368
368
|
positional arguments:
|
|
@@ -443,7 +443,7 @@ Examples:
|
|
|
443
443
|
<summary><b>2. Interactive Shell</b></summary>
|
|
444
444
|
|
|
445
445
|
```bash
|
|
446
|
-
ONVIF Interactive Shell — v0.2.
|
|
446
|
+
ONVIF Interactive Shell — v0.2.9
|
|
447
447
|
https://github.com/nirsimetri/onvif-python
|
|
448
448
|
|
|
449
449
|
Basic Commands:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
onvif/__init__.py,sha256=
|
|
1
|
+
onvif/__init__.py,sha256=ss_jFuW2beoHfWWS4SMt7e_A3tBmCvtVkYsf_e6E9HU,505
|
|
2
2
|
onvif/client.py,sha256=_G00dKSvRkLKq5tDGm4XS_3fhSE3WJtYckK9WVzNj9c,27703
|
|
3
3
|
onvif/operator.py,sha256=fBaoWYC3ZVFdgd2S_cmztWiLAA-HaWwSflq278YNlTs,13970
|
|
4
4
|
onvif/cli/__init__.py,sha256=y3hc-mo-Iwwxf8m5vo9P_0m2ISzGuOy-jaRPkdRY05A,68
|
|
@@ -51,7 +51,7 @@ onvif/utils/discovery.py,sha256=YO44KiQhfcyUECNrRe4qe03DSh14GGVByu1W5ekbAXU,1476
|
|
|
51
51
|
onvif/utils/error_handlers.py,sha256=MwPNfUeDA6d_nNZ01P0Ut67ERBYVvjsYrRsQhIo28yc,4851
|
|
52
52
|
onvif/utils/exceptions.py,sha256=5DxvqKAL7w038qPFeWmtkR5F3jWK0nz0qerzsOQPh0k,7788
|
|
53
53
|
onvif/utils/parser.py,sha256=QYzzIqsP1RuSIdx0SYPnighomYkLsfroRPMcjGOmgeo,5125
|
|
54
|
-
onvif/utils/service.py,sha256=
|
|
54
|
+
onvif/utils/service.py,sha256=OGbvKhU4qCtP198ph8Osl4IXPIKBYpZYwz5kqBtkHGg,13708
|
|
55
55
|
onvif/utils/wsdl.py,sha256=MuQ-2L0M3eXQcKfhOeUgGqZMTXI3iIbCO8tyQR09mn4,27796
|
|
56
56
|
onvif/utils/xml_capture.py,sha256=r8N2_D1hbKywMdftlTTMnxPhzxOsJDLkEJDKgudfpbo,7984
|
|
57
57
|
onvif/utils/zeep.py,sha256=nXY7gxYV806EQhA4ZlUR4YZDb4retDBgp6iDOumqa48,29740
|
|
@@ -126,9 +126,9 @@ onvif/wsdl/ver20/util/federated_search_documentation.html,sha256=GR6a4SPBsRDisaW
|
|
|
126
126
|
onvif/wsdl/ver20/util/fedsearch-docu-viewer.xsl,sha256=8eP-uMZgsTtuU5WaVyCzs_DJZqWIFD7iRz_5-3ComPg,325
|
|
127
127
|
onvif/wsdl/ver20/util/onvif-wsdl-viewer.xsl,sha256=Emauxs6rh69IxlxlU3k_LEH_i3SsRbwIKUk-VcMlVgk,94525
|
|
128
128
|
onvif/wsdl/ver20/util/operationIndex.html,sha256=mUsAGgNUFCIQjVV9Rx_O5YUNW3EdWNhUkAbBY-xVMhQ,39290
|
|
129
|
-
onvif_python-0.2.
|
|
130
|
-
onvif_python-0.2.
|
|
131
|
-
onvif_python-0.2.
|
|
132
|
-
onvif_python-0.2.
|
|
133
|
-
onvif_python-0.2.
|
|
134
|
-
onvif_python-0.2.
|
|
129
|
+
onvif_python-0.2.9.dist-info/licenses/LICENSE.md,sha256=ya8FumJeUkFWwCMkG9KdMxHWRWMNhtI3vHzzAWPQS8s,1091
|
|
130
|
+
onvif_python-0.2.9.dist-info/METADATA,sha256=s-RHgx-PaCfMhnyAQAXMksTxHCZcRUyfoCssrii1sFs,62247
|
|
131
|
+
onvif_python-0.2.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
132
|
+
onvif_python-0.2.9.dist-info/entry_points.txt,sha256=7xUdI64yzWh7YfNPQDKCW9cT8XIgWuNCloikP9-yjqY,46
|
|
133
|
+
onvif_python-0.2.9.dist-info/top_level.txt,sha256=MqCi1uJmIvtVFJDz2IxLbpwq6FwDtWhqrWQtKwLaQg4,6
|
|
134
|
+
onvif_python-0.2.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|