Python-Unifi-Client 1.0.0__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.
@@ -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,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,8 @@
1
+ README.md
2
+ setup.py
3
+ Python_Unifi_Client.egg-info/PKG-INFO
4
+ Python_Unifi_Client.egg-info/SOURCES.txt
5
+ Python_Unifi_Client.egg-info/dependency_links.txt
6
+ Python_Unifi_Client.egg-info/top_level.txt
7
+ python-unifi-client/__init__.py
8
+ python-unifi-client/client.py
@@ -0,0 +1 @@
1
+ python-unifi-client
@@ -0,0 +1,77 @@
1
+ # UniFi‑API‑Client Python Port
2
+
3
+ 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.
4
+ This project preserves the original PHP functionality via Python’s `requests` and offers:
5
+
6
+ - cURL‑style options mirroring the PHP implementation
7
+ - Session management (login/logout)
8
+ - Controller‑side backup generation & download
9
+ - Most REST/stat endpoints translated to Python
10
+
11
+ > **Note:** User‑management methods (create/update/delete) are currently non‑functional due to authorization/404 errors. Contributions welcome!
12
+
13
+ ---
14
+
15
+ ## Features
16
+
17
+ - Login to UniFi OS & classic controllers
18
+ - Generate and download network backups
19
+ - Mirror PHP’s cURL options for timeouts, headers, SSL, etc.
20
+ - All major API/stat endpoints converted
21
+ - CSRF handling for UniFi OS
22
+
23
+ ---
24
+
25
+ ## Dependencies
26
+
27
+ - http
28
+ - sys
29
+ - requests
30
+ - From requests.exceptions import Timeout, RequestException
31
+ - time
32
+ - re
33
+ - json
34
+ - urllib.parse
35
+ - http.client
36
+ - logging
37
+ - base64
38
+
39
+ ## Example Usage
40
+
41
+ ```
42
+ from client import Client
43
+
44
+ # Initialize (disable SSL verify if using self‑signed certs)
45
+ client = Client(
46
+ user="admin",
47
+ password="secret",
48
+ baseurl="https://your-controller-ip",
49
+ ssl_verify=False
50
+ )
51
+
52
+ # Login
53
+ client.login()
54
+
55
+ # List sites
56
+ sites = client.list_sites()
57
+ print(sites)
58
+
59
+ # Generate & download backup
60
+ bak = client.generate_backup(days=0) # returns [{'url': '/dl/backup/XYZ.unf'}]
61
+ content = client.download_backup(bak[0]['url'])
62
+ with open("backup.unf", "wb") as f:
63
+ f.write(content)
64
+
65
+ # Logout
66
+ client.logout()
67
+ ```
68
+
69
+ ## Known Issues
70
+
71
+ - User management (create/update/delete) as well as some other admin required permissions return 404/unauthorized
72
+ - Some endpoints don't get met
73
+
74
+ ## License
75
+
76
+ - Same as the original github
77
+ - MIT