busylib 0.2.0__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 busylib might be problematic. Click here for more details.
- busylib/client.py +13 -14
- busylib/types.py +6 -10
- {busylib-0.2.0.dist-info → busylib-0.3.0.dist-info}/METADATA +1 -1
- busylib-0.3.0.dist-info/RECORD +9 -0
- busylib-0.2.0.dist-info/RECORD +0 -9
- {busylib-0.2.0.dist-info → busylib-0.3.0.dist-info}/WHEEL +0 -0
- {busylib-0.2.0.dist-info → busylib-0.3.0.dist-info}/licenses/LICENSE +0 -0
- {busylib-0.2.0.dist-info → busylib-0.3.0.dist-info}/top_level.txt +0 -0
busylib/client.py
CHANGED
|
@@ -287,20 +287,6 @@ class BusyBar:
|
|
|
287
287
|
data = self._handle_response(response)
|
|
288
288
|
return types.SuccessResponse(**data)
|
|
289
289
|
|
|
290
|
-
def enable_wifi(self) -> types.SuccessResponse:
|
|
291
|
-
response = self.client.post(
|
|
292
|
-
urllib.parse.urljoin(self.base_url, "/api/wifi/enable")
|
|
293
|
-
)
|
|
294
|
-
data = self._handle_response(response)
|
|
295
|
-
return types.SuccessResponse(**data)
|
|
296
|
-
|
|
297
|
-
def disable_wifi(self) -> types.SuccessResponse:
|
|
298
|
-
response = self.client.post(
|
|
299
|
-
urllib.parse.urljoin(self.base_url, "/api/wifi/disable")
|
|
300
|
-
)
|
|
301
|
-
data = self._handle_response(response)
|
|
302
|
-
return types.SuccessResponse(**data)
|
|
303
|
-
|
|
304
290
|
def get_wifi_status(self) -> types.StatusResponse:
|
|
305
291
|
response = self.client.get(
|
|
306
292
|
urllib.parse.urljoin(self.base_url, "/api/wifi/status")
|
|
@@ -368,3 +354,16 @@ class BusyBar:
|
|
|
368
354
|
params={"display": display},
|
|
369
355
|
)
|
|
370
356
|
return self._handle_response(response, as_bytes=True)
|
|
357
|
+
def ble_enable(self) -> types.SuccessResponse:
|
|
358
|
+
response = self.client.post(
|
|
359
|
+
urllib.parse.urljoin(self.base_url, "/api/ble/enable")
|
|
360
|
+
)
|
|
361
|
+
data = self._handle_response(response)
|
|
362
|
+
return types.SuccessResponse(**data)
|
|
363
|
+
|
|
364
|
+
def ble_disable(self) -> types.SuccessResponse:
|
|
365
|
+
response = self.client.post(
|
|
366
|
+
urllib.parse.urljoin(self.base_url, "/api/ble/disable")
|
|
367
|
+
)
|
|
368
|
+
data = self._handle_response(response)
|
|
369
|
+
return types.SuccessResponse(**data)
|
busylib/types.py
CHANGED
|
@@ -2,19 +2,18 @@ import dataclasses
|
|
|
2
2
|
import enum
|
|
3
3
|
import typing as tp
|
|
4
4
|
|
|
5
|
+
class WifiState(enum.Enum):
|
|
6
|
+
DISCONNECTED = "disconnected"
|
|
7
|
+
CONNECTED = "connected"
|
|
5
8
|
|
|
6
9
|
class WifiSecurityMethod(enum.Enum):
|
|
7
10
|
OPEN = "Open"
|
|
8
11
|
WPA = "WPA"
|
|
9
12
|
WPA2 = "WPA2"
|
|
10
13
|
WEP = "WEP"
|
|
11
|
-
WPA_ENTERPRISE = "WPA (Enterprise)"
|
|
12
|
-
WPA2_ENTERPRISE = "WPA2 (Enterprise)"
|
|
13
14
|
WPA_WPA2 = "WPA/WPA2"
|
|
14
15
|
WPA3 = "WPA3"
|
|
15
16
|
WPA2_WPA3 = "WPA2/WPA3"
|
|
16
|
-
WPA3_ENTERPRISE = "WPA3 (Enterprise)"
|
|
17
|
-
WPA2_WPA3_ENTERPRISE = "WPA2/WPA3 (Enterprise)"
|
|
18
17
|
|
|
19
18
|
|
|
20
19
|
class WifiIpMethod(enum.Enum):
|
|
@@ -33,12 +32,6 @@ class PowerState(enum.Enum):
|
|
|
33
32
|
CHARGED = "charged"
|
|
34
33
|
|
|
35
34
|
|
|
36
|
-
class WifiState(enum.Enum):
|
|
37
|
-
DISABLED = "disabled"
|
|
38
|
-
ENABLED = "enabled"
|
|
39
|
-
CONNECTED = "connected"
|
|
40
|
-
|
|
41
|
-
|
|
42
35
|
class ElementType(enum.Enum):
|
|
43
36
|
FILE = "file"
|
|
44
37
|
DIR = "dir"
|
|
@@ -187,6 +180,9 @@ class Network:
|
|
|
187
180
|
class StatusResponse:
|
|
188
181
|
state: WifiState | None = None
|
|
189
182
|
ssid: str | None = None
|
|
183
|
+
bssid: str | None = None
|
|
184
|
+
channel: int | None = None
|
|
185
|
+
rssi: int | None = None
|
|
190
186
|
security: WifiSecurityMethod | None = None
|
|
191
187
|
ip_config: WifiIpConfig | None = None
|
|
192
188
|
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
busylib/__init__.py,sha256=7CQFe1iS-QRVAVlufLarG0MXEjkbqZht_DI2kUvsHz0,28
|
|
2
|
+
busylib/client.py,sha256=9Xv_1wGSj4UL4GxN_DUsOoaoK3kMjyEI2x7vAZkTQKc,13078
|
|
3
|
+
busylib/exceptions.py,sha256=DHYoEXGdADXSxcgLq7BWqq_865J0LsMysZL-Wuip2wc,210
|
|
4
|
+
busylib/types.py,sha256=NRN5K-z86KhzREkO7AWtxGQqK067sQFTJ07CszBCZAQ,4063
|
|
5
|
+
busylib-0.3.0.dist-info/licenses/LICENSE,sha256=aJO9BQGuVb1fvGzHcgWYiwcC9kEFyD-FBb8SPO-ATJ4,1071
|
|
6
|
+
busylib-0.3.0.dist-info/METADATA,sha256=A22FG9UibubAY5BW5fRl0x4TdnpHCqaxp0O2niPd_EQ,5518
|
|
7
|
+
busylib-0.3.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
+
busylib-0.3.0.dist-info/top_level.txt,sha256=tXeqg2EVVj4E8-ywimkxRzuCJq2HqMXA0571IB15PDA,8
|
|
9
|
+
busylib-0.3.0.dist-info/RECORD,,
|
busylib-0.2.0.dist-info/RECORD
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
busylib/__init__.py,sha256=7CQFe1iS-QRVAVlufLarG0MXEjkbqZht_DI2kUvsHz0,28
|
|
2
|
-
busylib/client.py,sha256=3mm5Xqr0N_KvbdxHdOkV4PWTqcxMHq4hDZziz0ykYKU,13079
|
|
3
|
-
busylib/exceptions.py,sha256=DHYoEXGdADXSxcgLq7BWqq_865J0LsMysZL-Wuip2wc,210
|
|
4
|
-
busylib/types.py,sha256=P6WC7qzV2wJH6VHSKozdv6ujCTA-qrl5i25LVIewkic,4169
|
|
5
|
-
busylib-0.2.0.dist-info/licenses/LICENSE,sha256=aJO9BQGuVb1fvGzHcgWYiwcC9kEFyD-FBb8SPO-ATJ4,1071
|
|
6
|
-
busylib-0.2.0.dist-info/METADATA,sha256=VKuyfOWBb_C-mgQoC2jMXLX0X1Sw7oDjjXX6TiEXtRw,5518
|
|
7
|
-
busylib-0.2.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
-
busylib-0.2.0.dist-info/top_level.txt,sha256=tXeqg2EVVj4E8-ywimkxRzuCJq2HqMXA0571IB15PDA,8
|
|
9
|
-
busylib-0.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|