uiprotect 0.2.1__py3-none-any.whl → 0.3.0__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.
Potentially problematic release.
This version of uiprotect might be problematic. Click here for more details.
- uiprotect/cli/base.py +1 -1
- uiprotect/data/nvr.py +1 -1
- uiprotect/utils.py +1 -1
- {uiprotect-0.2.1.dist-info → uiprotect-0.3.0.dist-info}/METADATA +9 -5
- {uiprotect-0.2.1.dist-info → uiprotect-0.3.0.dist-info}/RECORD +8 -8
- {uiprotect-0.2.1.dist-info → uiprotect-0.3.0.dist-info}/LICENSE +0 -0
- {uiprotect-0.2.1.dist-info → uiprotect-0.3.0.dist-info}/WHEEL +0 -0
- {uiprotect-0.2.1.dist-info → uiprotect-0.3.0.dist-info}/entry_points.txt +0 -0
uiprotect/cli/base.py
CHANGED
|
@@ -208,7 +208,7 @@ def adopt(ctx: typer.Context, name: Optional[str] = typer.Argument(None)) -> Non
|
|
|
208
208
|
Adopts a device.
|
|
209
209
|
|
|
210
210
|
By default, unadopted devices do not show up in the bootstrap. Use
|
|
211
|
-
`
|
|
211
|
+
`uiprotect -u` to show unadopted devices.
|
|
212
212
|
"""
|
|
213
213
|
require_device_id(ctx)
|
|
214
214
|
obj: ProtectAdoptableDeviceModel = ctx.obj.device
|
uiprotect/data/nvr.py
CHANGED
|
@@ -4,6 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
|
|
5
5
|
import asyncio
|
|
6
6
|
import logging
|
|
7
|
+
import zoneinfo
|
|
7
8
|
from datetime import datetime, timedelta, tzinfo
|
|
8
9
|
from functools import cache
|
|
9
10
|
from ipaddress import IPv4Address, IPv6Address
|
|
@@ -13,7 +14,6 @@ from uuid import UUID
|
|
|
13
14
|
|
|
14
15
|
import aiofiles
|
|
15
16
|
import orjson
|
|
16
|
-
import zoneinfo
|
|
17
17
|
from aiofiles import os as aos
|
|
18
18
|
from pydantic.v1.fields import PrivateAttr
|
|
19
19
|
|
uiprotect/utils.py
CHANGED
|
@@ -10,6 +10,7 @@ import re
|
|
|
10
10
|
import socket
|
|
11
11
|
import sys
|
|
12
12
|
import time
|
|
13
|
+
import zoneinfo
|
|
13
14
|
from collections import Counter
|
|
14
15
|
from collections.abc import Callable, Coroutine, Iterable
|
|
15
16
|
from copy import deepcopy
|
|
@@ -26,7 +27,6 @@ from typing import TYPE_CHECKING, Any, TypeVar, Union, overload
|
|
|
26
27
|
from uuid import UUID
|
|
27
28
|
|
|
28
29
|
import jwt
|
|
29
|
-
import zoneinfo
|
|
30
30
|
from aiohttp import ClientResponse
|
|
31
31
|
from pydantic.v1.fields import SHAPE_DICT, SHAPE_LIST, SHAPE_SET, ModelField
|
|
32
32
|
from pydantic.v1.utils import to_camel
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: uiprotect
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Python API for Unifi Protect (Unofficial)
|
|
5
5
|
Home-page: https://github.com/uilibs/uiprotect
|
|
6
6
|
License: MIT
|
|
@@ -90,6 +90,10 @@ Install this via pip (or your favorite package manager):
|
|
|
90
90
|
|
|
91
91
|
`pip install uiprotect`
|
|
92
92
|
|
|
93
|
+
## History
|
|
94
|
+
|
|
95
|
+
This project was split off from `pyunifiprotect` because that project changed its license to one that would not be accepted in Home Assistant. This project is committed to keeping the MIT license.
|
|
96
|
+
|
|
93
97
|
## Credits
|
|
94
98
|
|
|
95
99
|
- Bjarne Riis ([@briis](https://github.com/briis/)) for the original pyunifiprotect package
|
|
@@ -134,7 +138,7 @@ If you want to install `uiprotect` natively, the below are the requirements:
|
|
|
134
138
|
|
|
135
139
|
- [UniFi Protect](https://ui.com/camera-security) version 1.20+
|
|
136
140
|
- Latest version of library is generally only tested against the two latest minor version. This is either two latest stable versions (such as 1.21.x and 2.0.x) or the latest EA version and stable version (such as 2.2.x EA and 2.1.x).
|
|
137
|
-
- [Python](https://www.python.org/) 3.
|
|
141
|
+
- [Python](https://www.python.org/) 3.10+
|
|
138
142
|
- POSIX compatible system
|
|
139
143
|
- Library is only test on Linux, specifically the latest Debian version available for the official Python Docker images, but there is no reason the library should not work on any Linux distro or MacOS.
|
|
140
144
|
- [ffmpeg](https://ffmpeg.org/)
|
|
@@ -165,7 +169,7 @@ pip install git+https://github.com/uilibs/uiprotect.git#egg=uiprotect
|
|
|
165
169
|
A Docker container is also provided so you do not need to install/manage Python as well. You can add the following to your `.bashrc` or similar.
|
|
166
170
|
|
|
167
171
|
```bash
|
|
168
|
-
function
|
|
172
|
+
function uiprotect() {
|
|
169
173
|
docker run --rm -it \
|
|
170
174
|
-e UFP_USERNAME=YOUR_USERNAME_HERE \
|
|
171
175
|
-e UFP_PASSWORD=YOUR_PASSWORD_HERE \
|
|
@@ -200,8 +204,8 @@ export UFP_PORT=443
|
|
|
200
204
|
# change to false if you do not have a valid HTTPS Certificate for your instance
|
|
201
205
|
export UFP_SSL_VERIFY=True
|
|
202
206
|
|
|
203
|
-
|
|
204
|
-
|
|
207
|
+
uiprotect --help
|
|
208
|
+
uiprotect nvr
|
|
205
209
|
```
|
|
206
210
|
|
|
207
211
|
### Python
|
|
@@ -3,7 +3,7 @@ uiprotect/__main__.py,sha256=T69KE5W4zek6qeNEL8_Fq2DEfBc04SqSuIOJpiW4ydE,471
|
|
|
3
3
|
uiprotect/api.py,sha256=mmAmPBs0Zev_2KWLO_l5QU8pFOsFzuYt-OZMvfV3mq0,65694
|
|
4
4
|
uiprotect/cli/__init__.py,sha256=tmwtYrhM8rjOw8noKD6NALl_2Nu3xIycDuQyEKD5oMk,8832
|
|
5
5
|
uiprotect/cli/backup.py,sha256=Mtjd2f0w7zjIeLkJILKxiBnZJYXypzC9gpyAmBZ8sq0,36746
|
|
6
|
-
uiprotect/cli/base.py,sha256=
|
|
6
|
+
uiprotect/cli/base.py,sha256=IyK_JZbw7C6m8R46iMzfVOs4on5TpedFxaDrYz_v_0g,7623
|
|
7
7
|
uiprotect/cli/cameras.py,sha256=mVLJ5FjZPSbpNXvtd7Yiz17zMDSdLWT0p6Wcaqpt0GQ,16996
|
|
8
8
|
uiprotect/cli/chimes.py,sha256=92kNiZN7FpuCF7CqK9oLPt2jQ96tNhTjP1JcOdJAKhU,5350
|
|
9
9
|
uiprotect/cli/doorlocks.py,sha256=XMftrrK0O0bWZHOuTwg9m4p9U7gC0FzHFb72bSnlUEg,3547
|
|
@@ -18,7 +18,7 @@ uiprotect/data/base.py,sha256=k65F05OHN2l-nlQ5bVeXxTSYvvGj7pZz_jfe2KmWOSk,37423
|
|
|
18
18
|
uiprotect/data/bootstrap.py,sha256=d3SmJa4SJkosNc_Ve_ySPnRxtIfxXdioTmAoczuz3YQ,21738
|
|
19
19
|
uiprotect/data/convert.py,sha256=f8QkwZnlNbV_W-YognlDvZ1gQKp5yFuC50396hcu6DU,2127
|
|
20
20
|
uiprotect/data/devices.py,sha256=RMucQXXAyN6VwLvFZwsxauStwXZkdQGUITSZ9h_iQXY,112765
|
|
21
|
-
uiprotect/data/nvr.py,sha256=
|
|
21
|
+
uiprotect/data/nvr.py,sha256=eDfSAeOvaI1bHrpkZReW76934lrEBz8GKOfxDfq7xlw,47485
|
|
22
22
|
uiprotect/data/types.py,sha256=5eLL2jBl1eHiMwxbL6l0qngsmhg1F0dBrAS5GtDVdgg,15427
|
|
23
23
|
uiprotect/data/user.py,sha256=c-rslssNHhHOYplPE5lGGfuDexvI0mVYhbb6Xyi5dgo,7022
|
|
24
24
|
uiprotect/data/websocket.py,sha256=HKAze9b9soOS03_2zixRTR7jlFIA4ph9wMZEo15q6NY,6107
|
|
@@ -28,10 +28,10 @@ uiprotect/release_cache.json,sha256=NamnSFy78hOWY0DPO87J9ELFCAN6NnVquv8gQO75ZG4,
|
|
|
28
28
|
uiprotect/stream.py,sha256=V4aJfVWpSUsWE1PQrXH8F7obQQi1ukPAZ7PzwABjt0I,4942
|
|
29
29
|
uiprotect/test_util/__init__.py,sha256=sSEXu6_pwdYNQSCYtftpX1Dy1S8XYOvhrpECYRxeKJE,18596
|
|
30
30
|
uiprotect/test_util/anonymize.py,sha256=AGYELhDC4BrdK0deI6zh5jFp3SuM_HvAWLeoxFHSiwg,8486
|
|
31
|
-
uiprotect/utils.py,sha256=
|
|
31
|
+
uiprotect/utils.py,sha256=kGh1DcejItZ0_XEoAQNVZMtU1w9JHIeNSvm3T-llSxs,17841
|
|
32
32
|
uiprotect/websocket.py,sha256=iMTdchymaCgVHsmY1bRbxkcymqt6WQircIHYNxCu178,7289
|
|
33
|
-
uiprotect-0.
|
|
34
|
-
uiprotect-0.
|
|
35
|
-
uiprotect-0.
|
|
36
|
-
uiprotect-0.
|
|
37
|
-
uiprotect-0.
|
|
33
|
+
uiprotect-0.3.0.dist-info/LICENSE,sha256=INx18jhdbVXMEiiBANeKEbrbz57ckgzxk5uutmmcxGk,1111
|
|
34
|
+
uiprotect-0.3.0.dist-info/METADATA,sha256=s5GehHZ_1jmbHUvC7fs3OilwwTg9lGGbbcYX5PdEYRg,10922
|
|
35
|
+
uiprotect-0.3.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
36
|
+
uiprotect-0.3.0.dist-info/entry_points.txt,sha256=J78AUTPrTTxgI3s7SVgrmGqDP7piX2wuuEORzhDdVRA,47
|
|
37
|
+
uiprotect-0.3.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|