onvif-python 0.0.1__tar.gz → 0.0.3__tar.gz
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_python-0.0.1/onvif_python.egg-info → onvif_python-0.0.3}/PKG-INFO +13 -11
- {onvif_python-0.0.1 → onvif_python-0.0.3}/README.md +12 -10
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/__init__.py +3 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/client.py +21 -8
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/devicemgmt.py +1 -3
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/search.py +1 -1
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/security/keystore.py +1 -1
- onvif_python-0.0.3/onvif/utils/zeep.py +49 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3/onvif_python.egg-info}/PKG-INFO +13 -11
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif_python.egg-info/SOURCES.txt +1 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/pyproject.toml +1 -1
- {onvif_python-0.0.1 → onvif_python-0.0.3}/LICENSE.md +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/MANIFEST.in +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/operator.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/__init__.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/accesscontrol.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/accessrules.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/actionengine.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/analytics/analytics.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/analytics/ruleengine.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/analyticsdevice.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/appmgmt.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/authenticationbehavior.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/credential.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/deviceio.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/display.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/doorcontrol.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/events/events.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/events/notification.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/events/pullpoint.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/events/subscription.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/imaging.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/media.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/media2.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/provisioning.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/ptz.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/receiver.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/recording.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/replay.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/schedule.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/security/advancedsecurity.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/security/authorizationserver.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/security/dot1x.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/security/jwt.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/security/mediasigning.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/security/tlsserver.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/thermal.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/services/uplink.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/utils/__init__.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/utils/exceptions.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/utils/wsdl.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/accesscontrol/wsdl/index.html +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/accessrules/wsdl/accessrules.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/accessrules/wsdl/index.html +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/actionengine.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/advancedsecurity/wsdl/advancedsecurity.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/advancedsecurity/wsdl/index.html +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/analyticsdevice.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/appmgmt/wsdl/appmgmt.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/appmgmt/wsdl/index.html +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/authenticationbehavior/wsdl/authenticationbehavior.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/authenticationbehavior/wsdl/index.html +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/credential/wsdl/credential.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/credential/wsdl/index.html +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/device/wsdl/devicemgmt.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/deviceio.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/display/display.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/display/wsdl/index.htm +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/display.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/doorcontrol/wsdl/index.html +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/events/wsdl/bw-2-vs-mod.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/events/wsdl/event-vs.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/events/wsdl/event.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/events/wsdl/index.html +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/federatedsearch.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/media/wsdl/media.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/pacs/accesscontrol.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/pacs/doorcontrol.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/pacs/types.xsd +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/provisioning/wsdl/provisioning.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/receiver.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/recording.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/replay.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/schedule/wsdl/index.html +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/schedule/wsdl/schedule.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/schema/common.xsd +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/schema/metadatastream.xsd +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/schema/onvif.xsd +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/search.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/thermal/wsdl/index.html +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/thermal/wsdl/thermal.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/topics/topicns.xml +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/uplink/wsdl/index.html +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/uplink/wsdl/uplink.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver20/analytics/humanbody.xsd +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver20/analytics/humanface.xsd +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver20/analytics/index.html +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver20/analytics/radiometry.xsd +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver20/analytics/rules.xsd +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver20/analytics/wsdl/analytics.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver20/analytics/wsdl/index.html +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver20/imaging/wsdl/imaging.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver20/media/wsdl/index.html +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver20/media/wsdl/media.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver20/ptz/wsdl/ptz.wsdl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver20/util/federated_search_documentation.html +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver20/util/fedsearch-docu-viewer.xsl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver20/util/onvif-wsdl-viewer.xsl +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver20/util/operationIndex.html +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif_python.egg-info/dependency_links.txt +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif_python.egg-info/requires.txt +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/onvif_python.egg-info/top_level.txt +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/setup.cfg +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/setup.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/tests/test_client.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/tests/test_core.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/tests/test_exceptions.py +0 -0
- {onvif_python-0.0.1 → onvif_python-0.0.3}/tests/test_wsdl_map.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: onvif-python
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3
|
|
4
4
|
Summary: A comprehensive and developer-friendly Python library for working with ONVIF-compliant devices
|
|
5
5
|
Author-email: Nirsimetri Technologies® <open@nirsimetri.com>
|
|
6
6
|
Maintainer: Kaburagi
|
|
@@ -41,9 +41,9 @@ Dynamic: license-file
|
|
|
41
41
|
|
|
42
42
|
[](https://github.com/nirsimetri/onvif-python?tab=MIT-1-ov-file)
|
|
43
43
|
[](https://deepwiki.com/nirsimetri/onvif-python)
|
|
44
|
-
[](https://github.com/nirsimetri/onvif-python/releases)
|
|
45
45
|
<br>
|
|
46
|
-
[](https://pypi.org/project/onvif-python/)
|
|
47
47
|
[](https://pypi.org/project/onvif-python/)
|
|
48
48
|
|
|
49
49
|
Are you having trouble finding a Python ONVIF library that supports your device?
|
|
@@ -108,11 +108,8 @@ client = ONVIFClient("192.168.1.17", 8000, "admin", "admin123")
|
|
|
108
108
|
- `client.events()` — Events
|
|
109
109
|
- `client.imaging()` — Imaging
|
|
110
110
|
- `client.media()` — Media
|
|
111
|
-
- `client.media2()` — Media 2
|
|
112
111
|
- `client.ptz()` — PTZ (Pan-Tilt-Zoom)
|
|
113
|
-
- `client.deviceio()` — Device IO
|
|
114
112
|
- `client.analytics()` — Analytics
|
|
115
|
-
- `client.recording()` — Recording
|
|
116
113
|
|
|
117
114
|
and so on, check [Implemented ONVIF Services](https://github.com/nirsimetri/onvif-python?tab=readme-ov-file#implemented-onvif-services) for more details
|
|
118
115
|
|
|
@@ -129,7 +126,7 @@ Retrieve basic information about the device, such as manufacturer, model, firmwa
|
|
|
129
126
|
```python
|
|
130
127
|
info = device.GetDeviceInformation()
|
|
131
128
|
print(info)
|
|
132
|
-
# Example output: {'Manufacturer': '
|
|
129
|
+
# Example output: {'Manufacturer': '..', 'Model': '..', 'FirmwareVersion': '..', 'SerialNumber': '..'}
|
|
133
130
|
```
|
|
134
131
|
|
|
135
132
|
**4. Get RTSP URL**
|
|
@@ -200,7 +197,7 @@ This library fully supports all major ONVIF Profiles listed below. Each profile
|
|
|
200
197
|
| Profile_T | [Document](https://www.onvif.org/wp-content/uploads/2018/09/ONVIF_Profile_T_Specification_v1-0.pdf) | Advanced video streaming (H.265, analytics metadata, motion detection) | Modern cameras and clients | ✅ Yes |
|
|
201
198
|
| Profile_C | [Document](https://www.onvif.org/wp-content/uploads/2017/01/2013_12_ONVIF_Profile_C_Specification_v1-0.pdf) | Access control, door monitoring | Door controllers, access systems | ✅ Yes |
|
|
202
199
|
| Profile_A | [Document](https://www.onvif.org/wp-content/uploads/2017/06/ONVIF_Profile_A_Specification_v1-0.pdf) | Advanced access control configuration, credential management | Access control clients and devices | ✅ Yes |
|
|
203
|
-
| Profile_D | [Document](https://www.onvif.org/wp-content/uploads/
|
|
200
|
+
| Profile_D | [Document](https://www.onvif.org/wp-content/uploads/2021/06/onvif-profile-d-specification-v1-0.pdf) | Access control peripherals (locks, sensors, relays) | Peripheral devices for access control | ✅ Yes |
|
|
204
201
|
| Profile_M | [Document](https://www.onvif.org/wp-content/uploads/2024/04/onvif-profile-m-specification-v1-1.pdf) | Metadata, analytics events, object detection | Analytics devices, metadata clients | ✅ Yes |
|
|
205
202
|
|
|
206
203
|
For a full description of each profile and its features, visit [ONVIF Profiles](https://www.onvif.org/profiles/).
|
|
@@ -251,7 +248,8 @@ ONVIF services are defined by WSDL bindings. In this library, there are two main
|
|
|
251
248
|
|
|
252
249
|
Most ONVIF services use a single binding, mapping directly to one endpoint. These are accessed via simple client methods, and the binding/xAddr is always known from device capabilities.
|
|
253
250
|
|
|
254
|
-
|
|
251
|
+
<details>
|
|
252
|
+
<summary>Examples:</summary>
|
|
255
253
|
|
|
256
254
|
```python
|
|
257
255
|
client.devicemgmt() # DeviceBinding
|
|
@@ -262,13 +260,16 @@ client.ptz() # PTZBinding
|
|
|
262
260
|
|
|
263
261
|
✅ These are considered fixed and always accessed directly.
|
|
264
262
|
|
|
263
|
+
</details>
|
|
264
|
+
|
|
265
265
|
### 2. Multi-Binding Services
|
|
266
266
|
|
|
267
267
|
Some ONVIF services have multiple bindings in the same WSDL. These typically include:
|
|
268
268
|
- A **root binding** (main entry point)
|
|
269
269
|
- One or more **sub-bindings**, discovered or created dynamically (e.g. after subscription/configuration creation)
|
|
270
270
|
|
|
271
|
-
|
|
271
|
+
<details>
|
|
272
|
+
<summary>Examples:</summary>
|
|
272
273
|
|
|
273
274
|
1. **Events**
|
|
274
275
|
- **Root:** `EventBinding`
|
|
@@ -316,6 +317,8 @@ Some ONVIF services have multiple bindings in the same WSDL. These typically inc
|
|
|
316
317
|
client.analytics() # root binding
|
|
317
318
|
client.ruleengine() # sub-binding accessor
|
|
318
319
|
```
|
|
320
|
+
</details>
|
|
321
|
+
|
|
319
322
|
### Summary
|
|
320
323
|
|
|
321
324
|
- **Single binding services:** Always accessed directly (e.g. `client.media()`).
|
|
@@ -358,7 +361,6 @@ If you are looking for other ONVIF Python libraries, here are some alternatives:
|
|
|
358
361
|
- [ONVIF Official Specifications](https://www.onvif.org/profiles/specifications/specification-history/)
|
|
359
362
|
- [ONVIF Official Specs Repository](https://github.com/onvif/specs)
|
|
360
363
|
- [ONVIF 2.0 Service Operation Index](https://www.onvif.org/onvif/ver20/util/operationIndex.html)
|
|
361
|
-
- [Project Specs Folder](../../specifications)
|
|
362
364
|
- [Usage Examples](./examples/)
|
|
363
365
|
|
|
364
366
|
## Legal Notice
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://github.com/nirsimetri/onvif-python?tab=MIT-1-ov-file)
|
|
4
4
|
[](https://deepwiki.com/nirsimetri/onvif-python)
|
|
5
|
-
[](https://github.com/nirsimetri/onvif-python/releases)
|
|
6
6
|
<br>
|
|
7
|
-
[](https://pypi.org/project/onvif-python/)
|
|
8
8
|
[](https://pypi.org/project/onvif-python/)
|
|
9
9
|
|
|
10
10
|
Are you having trouble finding a Python ONVIF library that supports your device?
|
|
@@ -69,11 +69,8 @@ client = ONVIFClient("192.168.1.17", 8000, "admin", "admin123")
|
|
|
69
69
|
- `client.events()` — Events
|
|
70
70
|
- `client.imaging()` — Imaging
|
|
71
71
|
- `client.media()` — Media
|
|
72
|
-
- `client.media2()` — Media 2
|
|
73
72
|
- `client.ptz()` — PTZ (Pan-Tilt-Zoom)
|
|
74
|
-
- `client.deviceio()` — Device IO
|
|
75
73
|
- `client.analytics()` — Analytics
|
|
76
|
-
- `client.recording()` — Recording
|
|
77
74
|
|
|
78
75
|
and so on, check [Implemented ONVIF Services](https://github.com/nirsimetri/onvif-python?tab=readme-ov-file#implemented-onvif-services) for more details
|
|
79
76
|
|
|
@@ -90,7 +87,7 @@ Retrieve basic information about the device, such as manufacturer, model, firmwa
|
|
|
90
87
|
```python
|
|
91
88
|
info = device.GetDeviceInformation()
|
|
92
89
|
print(info)
|
|
93
|
-
# Example output: {'Manufacturer': '
|
|
90
|
+
# Example output: {'Manufacturer': '..', 'Model': '..', 'FirmwareVersion': '..', 'SerialNumber': '..'}
|
|
94
91
|
```
|
|
95
92
|
|
|
96
93
|
**4. Get RTSP URL**
|
|
@@ -161,7 +158,7 @@ This library fully supports all major ONVIF Profiles listed below. Each profile
|
|
|
161
158
|
| Profile_T | [Document](https://www.onvif.org/wp-content/uploads/2018/09/ONVIF_Profile_T_Specification_v1-0.pdf) | Advanced video streaming (H.265, analytics metadata, motion detection) | Modern cameras and clients | ✅ Yes |
|
|
162
159
|
| Profile_C | [Document](https://www.onvif.org/wp-content/uploads/2017/01/2013_12_ONVIF_Profile_C_Specification_v1-0.pdf) | Access control, door monitoring | Door controllers, access systems | ✅ Yes |
|
|
163
160
|
| Profile_A | [Document](https://www.onvif.org/wp-content/uploads/2017/06/ONVIF_Profile_A_Specification_v1-0.pdf) | Advanced access control configuration, credential management | Access control clients and devices | ✅ Yes |
|
|
164
|
-
| Profile_D | [Document](https://www.onvif.org/wp-content/uploads/
|
|
161
|
+
| Profile_D | [Document](https://www.onvif.org/wp-content/uploads/2021/06/onvif-profile-d-specification-v1-0.pdf) | Access control peripherals (locks, sensors, relays) | Peripheral devices for access control | ✅ Yes |
|
|
165
162
|
| Profile_M | [Document](https://www.onvif.org/wp-content/uploads/2024/04/onvif-profile-m-specification-v1-1.pdf) | Metadata, analytics events, object detection | Analytics devices, metadata clients | ✅ Yes |
|
|
166
163
|
|
|
167
164
|
For a full description of each profile and its features, visit [ONVIF Profiles](https://www.onvif.org/profiles/).
|
|
@@ -212,7 +209,8 @@ ONVIF services are defined by WSDL bindings. In this library, there are two main
|
|
|
212
209
|
|
|
213
210
|
Most ONVIF services use a single binding, mapping directly to one endpoint. These are accessed via simple client methods, and the binding/xAddr is always known from device capabilities.
|
|
214
211
|
|
|
215
|
-
|
|
212
|
+
<details>
|
|
213
|
+
<summary>Examples:</summary>
|
|
216
214
|
|
|
217
215
|
```python
|
|
218
216
|
client.devicemgmt() # DeviceBinding
|
|
@@ -223,13 +221,16 @@ client.ptz() # PTZBinding
|
|
|
223
221
|
|
|
224
222
|
✅ These are considered fixed and always accessed directly.
|
|
225
223
|
|
|
224
|
+
</details>
|
|
225
|
+
|
|
226
226
|
### 2. Multi-Binding Services
|
|
227
227
|
|
|
228
228
|
Some ONVIF services have multiple bindings in the same WSDL. These typically include:
|
|
229
229
|
- A **root binding** (main entry point)
|
|
230
230
|
- One or more **sub-bindings**, discovered or created dynamically (e.g. after subscription/configuration creation)
|
|
231
231
|
|
|
232
|
-
|
|
232
|
+
<details>
|
|
233
|
+
<summary>Examples:</summary>
|
|
233
234
|
|
|
234
235
|
1. **Events**
|
|
235
236
|
- **Root:** `EventBinding`
|
|
@@ -277,6 +278,8 @@ Some ONVIF services have multiple bindings in the same WSDL. These typically inc
|
|
|
277
278
|
client.analytics() # root binding
|
|
278
279
|
client.ruleengine() # sub-binding accessor
|
|
279
280
|
```
|
|
281
|
+
</details>
|
|
282
|
+
|
|
280
283
|
### Summary
|
|
281
284
|
|
|
282
285
|
- **Single binding services:** Always accessed directly (e.g. `client.media()`).
|
|
@@ -319,7 +322,6 @@ If you are looking for other ONVIF Python libraries, here are some alternatives:
|
|
|
319
322
|
- [ONVIF Official Specifications](https://www.onvif.org/profiles/specifications/specification-history/)
|
|
320
323
|
- [ONVIF Official Specs Repository](https://github.com/onvif/specs)
|
|
321
324
|
- [ONVIF 2.0 Service Operation Index](https://www.onvif.org/onvif/ver20/util/operationIndex.html)
|
|
322
|
-
- [Project Specs Folder](../../specifications)
|
|
323
325
|
- [Usage Examples](./examples/)
|
|
324
326
|
|
|
325
327
|
## Legal Notice
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from .client import ONVIFClient
|
|
4
4
|
from .operator import ONVIFOperator, CacheMode
|
|
5
5
|
from .utils import ONVIFWSDL, ONVIFOperationException
|
|
6
|
+
from .utils.zeep import apply_patch
|
|
6
7
|
|
|
7
8
|
__all__ = [
|
|
8
9
|
"ONVIFClient",
|
|
@@ -11,3 +12,5 @@ __all__ = [
|
|
|
11
12
|
"ONVIFWSDL",
|
|
12
13
|
"ONVIFOperationException",
|
|
13
14
|
]
|
|
15
|
+
|
|
16
|
+
apply_patch()
|
|
@@ -130,32 +130,45 @@ class ONVIFClient:
|
|
|
130
130
|
self._authorizationserver = None
|
|
131
131
|
self._mediasigning = None
|
|
132
132
|
|
|
133
|
+
|
|
133
134
|
def _get_xaddr(self, service_name: str, service_path: str):
|
|
134
135
|
"""
|
|
135
136
|
Resolve XAddr from GetCapabilities. Fallback to default if not present.
|
|
137
|
+
Now supports nested Extension with _value_1 dict (after normalized parsing).
|
|
136
138
|
"""
|
|
137
139
|
svc = getattr(self.capabilities, service_name, None)
|
|
138
|
-
if svc and hasattr(svc, "XAddr") and svc.XAddr:
|
|
139
|
-
parsed = urlparse(svc.XAddr)
|
|
140
140
|
|
|
141
|
+
# Step 1: check direct attribute (e.g. capabilities.Media)
|
|
142
|
+
if svc and hasattr(svc, "XAddr"):
|
|
143
|
+
xaddr = svc.XAddr
|
|
144
|
+
else:
|
|
145
|
+
# Step 2: try legacy Extension.service_name
|
|
146
|
+
ext = getattr(self.capabilities, "Extension", None)
|
|
147
|
+
if ext and hasattr(ext, service_name):
|
|
148
|
+
svc = getattr(ext, service_name, None)
|
|
149
|
+
xaddr = getattr(svc, "XAddr", None) if svc else None
|
|
150
|
+
else:
|
|
151
|
+
# Step 3: try new-style _value_1 dict inside Extension
|
|
152
|
+
ext_dict = getattr(ext, "_value_1", {})
|
|
153
|
+
xaddr = ext_dict.get(service_name, {}).get("XAddr") if isinstance(ext_dict, dict) else None
|
|
154
|
+
|
|
155
|
+
if xaddr:
|
|
156
|
+
parsed = urlparse(xaddr)
|
|
141
157
|
# Host/port from device
|
|
142
158
|
device_host = parsed.hostname
|
|
143
159
|
device_port = parsed.port
|
|
144
|
-
|
|
145
160
|
# Host/port from connection
|
|
146
161
|
connect_host = self.common_args["host"]
|
|
147
162
|
connect_port = self.common_args["port"]
|
|
148
|
-
|
|
149
163
|
# if host/port differ, rewrite XAddr to use connection values
|
|
150
164
|
if (device_host != connect_host) or (device_port != connect_port):
|
|
151
|
-
protocol =
|
|
165
|
+
protocol = "https" if self.common_args["use_https"] else "http"
|
|
152
166
|
new_netloc = f"{connect_host}:{connect_port}"
|
|
153
167
|
rewritten = urlunparse((protocol, new_netloc, parsed.path, "", "", ""))
|
|
154
168
|
return rewritten
|
|
169
|
+
return xaddr
|
|
155
170
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
# fallback (legacy style)
|
|
171
|
+
# Fallback default
|
|
159
172
|
protocol = "https" if self.common_args["use_https"] else "http"
|
|
160
173
|
return f"{protocol}://{self.common_args['host']}:{self.common_args['port']}/onvif/{service_path}"
|
|
161
174
|
|
|
@@ -16,9 +16,7 @@ class Device:
|
|
|
16
16
|
)
|
|
17
17
|
|
|
18
18
|
def GetServices(self, IncludeCapability):
|
|
19
|
-
return self.operator.call(
|
|
20
|
-
"GetServices", IncludeCapability=IncludeCapability
|
|
21
|
-
)
|
|
19
|
+
return self.operator.call("GetServices", IncludeCapability=IncludeCapability)
|
|
22
20
|
|
|
23
21
|
def GetServiceCapabilities(self):
|
|
24
22
|
return self.operator.call("GetServiceCapabilities")
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# onvif/utils/zeep.py
|
|
2
|
+
|
|
3
|
+
from lxml.etree import QName
|
|
4
|
+
from zeep.xsd.elements.any import Any
|
|
5
|
+
from zeep.xsd.utils import max_occurs_iter
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def patched_parse_xmlelements(self, xmlelements, schema, name=None, context=None):
|
|
9
|
+
"""Patched version of parse_xmlelements for <xsd:any> to support child parsing."""
|
|
10
|
+
parsed_result = {}
|
|
11
|
+
|
|
12
|
+
for _ in max_occurs_iter(self.max_occurs):
|
|
13
|
+
if not xmlelements:
|
|
14
|
+
break
|
|
15
|
+
|
|
16
|
+
xmlelement = xmlelements.popleft()
|
|
17
|
+
tag_name = QName(xmlelement.tag).localname
|
|
18
|
+
children = list(xmlelement)
|
|
19
|
+
|
|
20
|
+
if children and schema:
|
|
21
|
+
child_result = {}
|
|
22
|
+
for child in children:
|
|
23
|
+
child_qname = QName(child.tag)
|
|
24
|
+
try:
|
|
25
|
+
xsd_el = schema.get_element(child_qname)
|
|
26
|
+
val = xsd_el.parse_xmlelement(
|
|
27
|
+
child, schema=schema, allow_none=True, context=context
|
|
28
|
+
)
|
|
29
|
+
child_result[child_qname.localname] = val
|
|
30
|
+
except Exception:
|
|
31
|
+
if list(child): # has nested children
|
|
32
|
+
nested = {
|
|
33
|
+
QName(sub.tag).localname: sub.text or sub
|
|
34
|
+
for sub in child
|
|
35
|
+
}
|
|
36
|
+
child_result[child_qname.localname] = nested
|
|
37
|
+
else:
|
|
38
|
+
child_result[child_qname.localname] = child.text or child
|
|
39
|
+
|
|
40
|
+
parsed_result[tag_name] = child_result
|
|
41
|
+
else:
|
|
42
|
+
parsed_result[tag_name] = xmlelement.text or xmlelement
|
|
43
|
+
|
|
44
|
+
return parsed_result
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def apply_patch():
|
|
48
|
+
"""Inject the custom parse_xmlelements method into zeep.xsd.elements.any.Any."""
|
|
49
|
+
Any.parse_xmlelements = patched_parse_xmlelements
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: onvif-python
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3
|
|
4
4
|
Summary: A comprehensive and developer-friendly Python library for working with ONVIF-compliant devices
|
|
5
5
|
Author-email: Nirsimetri Technologies® <open@nirsimetri.com>
|
|
6
6
|
Maintainer: Kaburagi
|
|
@@ -41,9 +41,9 @@ Dynamic: license-file
|
|
|
41
41
|
|
|
42
42
|
[](https://github.com/nirsimetri/onvif-python?tab=MIT-1-ov-file)
|
|
43
43
|
[](https://deepwiki.com/nirsimetri/onvif-python)
|
|
44
|
-
[](https://github.com/nirsimetri/onvif-python/releases)
|
|
45
45
|
<br>
|
|
46
|
-
[](https://pypi.org/project/onvif-python/)
|
|
47
47
|
[](https://pypi.org/project/onvif-python/)
|
|
48
48
|
|
|
49
49
|
Are you having trouble finding a Python ONVIF library that supports your device?
|
|
@@ -108,11 +108,8 @@ client = ONVIFClient("192.168.1.17", 8000, "admin", "admin123")
|
|
|
108
108
|
- `client.events()` — Events
|
|
109
109
|
- `client.imaging()` — Imaging
|
|
110
110
|
- `client.media()` — Media
|
|
111
|
-
- `client.media2()` — Media 2
|
|
112
111
|
- `client.ptz()` — PTZ (Pan-Tilt-Zoom)
|
|
113
|
-
- `client.deviceio()` — Device IO
|
|
114
112
|
- `client.analytics()` — Analytics
|
|
115
|
-
- `client.recording()` — Recording
|
|
116
113
|
|
|
117
114
|
and so on, check [Implemented ONVIF Services](https://github.com/nirsimetri/onvif-python?tab=readme-ov-file#implemented-onvif-services) for more details
|
|
118
115
|
|
|
@@ -129,7 +126,7 @@ Retrieve basic information about the device, such as manufacturer, model, firmwa
|
|
|
129
126
|
```python
|
|
130
127
|
info = device.GetDeviceInformation()
|
|
131
128
|
print(info)
|
|
132
|
-
# Example output: {'Manufacturer': '
|
|
129
|
+
# Example output: {'Manufacturer': '..', 'Model': '..', 'FirmwareVersion': '..', 'SerialNumber': '..'}
|
|
133
130
|
```
|
|
134
131
|
|
|
135
132
|
**4. Get RTSP URL**
|
|
@@ -200,7 +197,7 @@ This library fully supports all major ONVIF Profiles listed below. Each profile
|
|
|
200
197
|
| Profile_T | [Document](https://www.onvif.org/wp-content/uploads/2018/09/ONVIF_Profile_T_Specification_v1-0.pdf) | Advanced video streaming (H.265, analytics metadata, motion detection) | Modern cameras and clients | ✅ Yes |
|
|
201
198
|
| Profile_C | [Document](https://www.onvif.org/wp-content/uploads/2017/01/2013_12_ONVIF_Profile_C_Specification_v1-0.pdf) | Access control, door monitoring | Door controllers, access systems | ✅ Yes |
|
|
202
199
|
| Profile_A | [Document](https://www.onvif.org/wp-content/uploads/2017/06/ONVIF_Profile_A_Specification_v1-0.pdf) | Advanced access control configuration, credential management | Access control clients and devices | ✅ Yes |
|
|
203
|
-
| Profile_D | [Document](https://www.onvif.org/wp-content/uploads/
|
|
200
|
+
| Profile_D | [Document](https://www.onvif.org/wp-content/uploads/2021/06/onvif-profile-d-specification-v1-0.pdf) | Access control peripherals (locks, sensors, relays) | Peripheral devices for access control | ✅ Yes |
|
|
204
201
|
| Profile_M | [Document](https://www.onvif.org/wp-content/uploads/2024/04/onvif-profile-m-specification-v1-1.pdf) | Metadata, analytics events, object detection | Analytics devices, metadata clients | ✅ Yes |
|
|
205
202
|
|
|
206
203
|
For a full description of each profile and its features, visit [ONVIF Profiles](https://www.onvif.org/profiles/).
|
|
@@ -251,7 +248,8 @@ ONVIF services are defined by WSDL bindings. In this library, there are two main
|
|
|
251
248
|
|
|
252
249
|
Most ONVIF services use a single binding, mapping directly to one endpoint. These are accessed via simple client methods, and the binding/xAddr is always known from device capabilities.
|
|
253
250
|
|
|
254
|
-
|
|
251
|
+
<details>
|
|
252
|
+
<summary>Examples:</summary>
|
|
255
253
|
|
|
256
254
|
```python
|
|
257
255
|
client.devicemgmt() # DeviceBinding
|
|
@@ -262,13 +260,16 @@ client.ptz() # PTZBinding
|
|
|
262
260
|
|
|
263
261
|
✅ These are considered fixed and always accessed directly.
|
|
264
262
|
|
|
263
|
+
</details>
|
|
264
|
+
|
|
265
265
|
### 2. Multi-Binding Services
|
|
266
266
|
|
|
267
267
|
Some ONVIF services have multiple bindings in the same WSDL. These typically include:
|
|
268
268
|
- A **root binding** (main entry point)
|
|
269
269
|
- One or more **sub-bindings**, discovered or created dynamically (e.g. after subscription/configuration creation)
|
|
270
270
|
|
|
271
|
-
|
|
271
|
+
<details>
|
|
272
|
+
<summary>Examples:</summary>
|
|
272
273
|
|
|
273
274
|
1. **Events**
|
|
274
275
|
- **Root:** `EventBinding`
|
|
@@ -316,6 +317,8 @@ Some ONVIF services have multiple bindings in the same WSDL. These typically inc
|
|
|
316
317
|
client.analytics() # root binding
|
|
317
318
|
client.ruleengine() # sub-binding accessor
|
|
318
319
|
```
|
|
320
|
+
</details>
|
|
321
|
+
|
|
319
322
|
### Summary
|
|
320
323
|
|
|
321
324
|
- **Single binding services:** Always accessed directly (e.g. `client.media()`).
|
|
@@ -358,7 +361,6 @@ If you are looking for other ONVIF Python libraries, here are some alternatives:
|
|
|
358
361
|
- [ONVIF Official Specifications](https://www.onvif.org/profiles/specifications/specification-history/)
|
|
359
362
|
- [ONVIF Official Specs Repository](https://github.com/onvif/specs)
|
|
360
363
|
- [ONVIF 2.0 Service Operation Index](https://www.onvif.org/onvif/ver20/util/operationIndex.html)
|
|
361
|
-
- [Project Specs Folder](../../specifications)
|
|
362
364
|
- [Usage Examples](./examples/)
|
|
363
365
|
|
|
364
366
|
## Legal Notice
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "onvif-python"
|
|
7
|
-
version = "0.0.
|
|
7
|
+
version = "0.0.3"
|
|
8
8
|
description = "A comprehensive and developer-friendly Python library for working with ONVIF-compliant devices"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/accessrules/wsdl/accessrules.wsdl
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/authenticationbehavior/wsdl/index.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver10/provisioning/wsdl/provisioning.wsdl
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{onvif_python-0.0.1 → onvif_python-0.0.3}/onvif/wsdl/ver20/util/federated_search_documentation.html
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|