ezKit 2.0.26__tar.gz → 2.0.28__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.
- {ezkit-2.0.26/ezKit.egg-info → ezkit-2.0.28}/PKG-INFO +1 -1
- {ezkit-2.0.26 → ezkit-2.0.28}/ezKit/bandwagon.py +4 -4
- {ezkit-2.0.26 → ezkit-2.0.28/ezKit.egg-info}/PKG-INFO +1 -1
- {ezkit-2.0.26 → ezkit-2.0.28}/setup.py +1 -1
- {ezkit-2.0.26 → ezkit-2.0.28}/LICENSE +0 -0
- {ezkit-2.0.26 → ezkit-2.0.28}/MANIFEST.in +0 -0
- {ezkit-2.0.26 → ezkit-2.0.28}/README.md +0 -0
- {ezkit-2.0.26 → ezkit-2.0.28}/ezKit/__init__.py +0 -0
- {ezkit-2.0.26 → ezkit-2.0.28}/ezKit/__zabbix.py +0 -0
- {ezkit-2.0.26 → ezkit-2.0.28}/ezKit/asyncdatabase.py +0 -0
- {ezkit-2.0.26 → ezkit-2.0.28}/ezKit/cipher.py +0 -0
- {ezkit-2.0.26 → ezkit-2.0.28}/ezKit/database.py +0 -0
- {ezkit-2.0.26 → ezkit-2.0.28}/ezKit/errorcode.py +0 -0
- {ezkit-2.0.26 → ezkit-2.0.28}/ezKit/fastapix.py +0 -0
- {ezkit-2.0.26 → ezkit-2.0.28}/ezKit/http.py +0 -0
- {ezkit-2.0.26 → ezkit-2.0.28}/ezKit/redix.py +0 -0
- {ezkit-2.0.26 → ezkit-2.0.28}/ezKit/sendemail.py +0 -0
- {ezkit-2.0.26 → ezkit-2.0.28}/ezKit/stock.py +0 -0
- {ezkit-2.0.26 → ezkit-2.0.28}/ezKit/utils.py +0 -0
- {ezkit-2.0.26 → ezkit-2.0.28}/ezKit.egg-info/SOURCES.txt +0 -0
- {ezkit-2.0.26 → ezkit-2.0.28}/ezKit.egg-info/dependency_links.txt +0 -0
- {ezkit-2.0.26 → ezkit-2.0.28}/ezKit.egg-info/requires.txt +0 -0
- {ezkit-2.0.26 → ezkit-2.0.28}/ezKit.egg-info/top_level.txt +0 -0
- {ezkit-2.0.26 → ezkit-2.0.28}/pyproject.toml +0 -0
- {ezkit-2.0.26 → ezkit-2.0.28}/setup.cfg +0 -0
|
@@ -72,15 +72,15 @@ class BandwagonClient:
|
|
|
72
72
|
def format_disk(info: dict) -> str:
|
|
73
73
|
|
|
74
74
|
# 硬盘大小 (单位GB)
|
|
75
|
-
total = info["ve_disk_quota_gb"]
|
|
75
|
+
total = int(info["ve_disk_quota_gb"])
|
|
76
76
|
|
|
77
77
|
# 使用量 (单位GB)
|
|
78
78
|
used = info["ve_used_disk_space_b"] / (1024 * 1024 * 1024)
|
|
79
79
|
|
|
80
80
|
# 使用率
|
|
81
|
-
usage = (info["ve_used_disk_space_b"] / (
|
|
81
|
+
usage = (info["ve_used_disk_space_b"] / (total * 1024 * 1024 * 1024)) * 100
|
|
82
82
|
|
|
83
|
-
return f"{used:.2f}/{total} GB ({usage:.2f}%)"
|
|
83
|
+
return f"{used:.2f}/{total:.0f} GB ({usage:.2f}%)"
|
|
84
84
|
|
|
85
85
|
|
|
86
86
|
def format_bandwidth(info: dict) -> str:
|
|
@@ -94,7 +94,7 @@ def format_bandwidth(info: dict) -> str:
|
|
|
94
94
|
# 使用率
|
|
95
95
|
usage = (info["data_counter"] / info["plan_monthly_data"]) * 100
|
|
96
96
|
|
|
97
|
-
return f"{used:.2f}/{total} GB ({usage:.2f}%)"
|
|
97
|
+
return f"{used:.2f}/{total:.0f} GB ({usage:.2f}%)"
|
|
98
98
|
|
|
99
99
|
|
|
100
100
|
def expiration_date(info: dict) -> str:
|
|
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
|