Python-Unifi-Client 1.0.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.
@@ -0,0 +1,94 @@
1
+ Metadata-Version: 2.4
2
+ Name: Python-Unifi-Client
3
+ Version: 1.0.0
4
+ Home-page: https://github.com/compdat-llc/unifi-client-python
5
+ Author: Michael Lapinski
6
+ Author-email: michaellapinski787@gmail.com
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Description-Content-Type: text/markdown
11
+ Dynamic: author
12
+ Dynamic: author-email
13
+ Dynamic: classifier
14
+ Dynamic: description
15
+ Dynamic: description-content-type
16
+ Dynamic: home-page
17
+
18
+ # UniFi‑API‑Client Python Port
19
+
20
+ A Python port of the [Art‑of‑WiFi/Unifi‑API‑Client](https://github.com/Art-of-WiFi/Unifi-API-client) library for interacting with Ubiquiti UniFi controllers.
21
+ This project preserves the original PHP functionality via Python’s `requests` and offers:
22
+
23
+ - cURL‑style options mirroring the PHP implementation
24
+ - Session management (login/logout)
25
+ - Controller‑side backup generation & download
26
+ - Most REST/stat endpoints translated to Python
27
+
28
+ > **Note:** User‑management methods (create/update/delete) are currently non‑functional due to authorization/404 errors. Contributions welcome!
29
+
30
+ ---
31
+
32
+ ## Features
33
+
34
+ - Login to UniFi OS & classic controllers
35
+ - Generate and download network backups
36
+ - Mirror PHP’s cURL options for timeouts, headers, SSL, etc.
37
+ - All major API/stat endpoints converted
38
+ - CSRF handling for UniFi OS
39
+
40
+ ---
41
+
42
+ ## Dependencies
43
+
44
+ - http
45
+ - sys
46
+ - requests
47
+ - From requests.exceptions import Timeout, RequestException
48
+ - time
49
+ - re
50
+ - json
51
+ - urllib.parse
52
+ - http.client
53
+ - logging
54
+ - base64
55
+
56
+ ## Example Usage
57
+
58
+ ```
59
+ from client import Client
60
+
61
+ # Initialize (disable SSL verify if using self‑signed certs)
62
+ client = Client(
63
+ user="admin",
64
+ password="secret",
65
+ baseurl="https://your-controller-ip",
66
+ ssl_verify=False
67
+ )
68
+
69
+ # Login
70
+ client.login()
71
+
72
+ # List sites
73
+ sites = client.list_sites()
74
+ print(sites)
75
+
76
+ # Generate & download backup
77
+ bak = client.generate_backup(days=0) # returns [{'url': '/dl/backup/XYZ.unf'}]
78
+ content = client.download_backup(bak[0]['url'])
79
+ with open("backup.unf", "wb") as f:
80
+ f.write(content)
81
+
82
+ # Logout
83
+ client.logout()
84
+ ```
85
+
86
+ ## Known Issues
87
+
88
+ - User management (create/update/delete) as well as some other admin required permissions return 404/unauthorized
89
+ - Some endpoints don't get met
90
+
91
+ ## License
92
+
93
+ - Same as the original github
94
+ - MIT
@@ -0,0 +1,6 @@
1
+ python-unifi-client/__init__.py,sha256=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN_XKdLCPjaYaY,2
2
+ python-unifi-client/client.py,sha256=3pNuIzpj_vJq1fWlhcN5LeD0qhSiGGSsvVd10TZzoUk,105467
3
+ python_unifi_client-1.0.0.dist-info/METADATA,sha256=kg_tg2b28ljMMkJlYwzAS9PoKx3rOr_75CtGevCGlZA,2505
4
+ python_unifi_client-1.0.0.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
5
+ python_unifi_client-1.0.0.dist-info/top_level.txt,sha256=FCrLtqZd79PRI6eCtX4XfFzdf9_oh-wGEXlkhYyHxMs,20
6
+ python_unifi_client-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.7.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ python-unifi-client