hostpulse 0.1.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,161 @@
1
+ Metadata-Version: 2.4
2
+ Name: hostpulse
3
+ Version: 0.1.0
4
+ Summary: A command-line tool for checking local system status
5
+ License-Expression: MIT
6
+ Requires-Python: >=3.14
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Requires-Dist: psutil==7.2.2
10
+ Dynamic: license-file
11
+
12
+ # HostPulse
13
+
14
+ [English](https://github.com/Yjuncc/hostpulse/blob/main/README.md) | [简体中文](https://github.com/Yjuncc/hostpulse/blob/main/README.zh-CN.md) | [繁體中文](https://github.com/Yjuncc/hostpulse/blob/main/README.zh-TW.md)
15
+
16
+ HostPulse is an open-source Python command-line tool for checking local system status.
17
+
18
+ It provides a quick overview of the operating system, CPU, memory, disk, and system uptime.
19
+
20
+ Each time HostPulse runs, it reads and displays the system status once and then exits automatically.
21
+
22
+ ## Features
23
+
24
+ HostPulse v0.1.0 provides the following features:
25
+
26
+ - **Operating system**: Display the operating system in use.
27
+ - **CPU architecture**: Display the processor architecture, such as ARM64 or x86_64.
28
+ - **Logical CPU count**: Display the number of logical CPUs detected by the system.
29
+ - **Hostname**: Display the computer's hostname.
30
+ - **CPU usage**: Display the current CPU usage percentage.
31
+ - **Memory information**: Display total memory and memory usage percentage.
32
+ - **Disk information**: Display the capacity and usage percentage of the filesystem containing the system root directory.
33
+ - **System uptime**: Display the time elapsed since the last system boot.
34
+
35
+ ## Requirements
36
+
37
+ - Python 3.14 or newer
38
+ - psutil 7.2.2
39
+
40
+ When HostPulse is installed through pip, the required psutil dependency is installed automatically.
41
+
42
+ ## Tested Environment
43
+
44
+ HostPulse v0.1.0 has completed local installation and execution testing in the following environment:
45
+
46
+ - **Operating system**: macOS (Apple Silicon)
47
+ - **Python**: 3.14
48
+ - **psutil**: 7.2.2
49
+
50
+ Python package building, local installation, command-line execution, and uninstallation tests have passed.
51
+
52
+ The program currently displays system information labels in Traditional Chinese.
53
+
54
+ ## Installation
55
+
56
+ HostPulse is distributed through PyPI (the Python Package Index) and can be installed using pip.
57
+
58
+ Using a Python virtual environment is recommended to avoid dependency conflicts with other projects.
59
+
60
+ **1. Create a virtual environment**
61
+
62
+ Run the following command in the macOS Terminal:
63
+
64
+ ```bash
65
+ python3.14 -m venv .venv
66
+ ```
67
+
68
+ **2. Activate the virtual environment**
69
+
70
+ ```bash
71
+ source .venv/bin/activate
72
+ ```
73
+
74
+ **3. Install HostPulse**
75
+
76
+ ```bash
77
+ python -m pip install hostpulse
78
+ ```
79
+
80
+ pip downloads and installs HostPulse and its required dependencies from PyPI.
81
+
82
+ ## Usage
83
+
84
+ After installation, run the following command in the activated Python virtual environment:
85
+
86
+ ```bash
87
+ hostpulse
88
+ ```
89
+
90
+ The program displays the current system information, including CPU, memory, disk usage, and system uptime.
91
+
92
+ It exits automatically after displaying the results and requires no additional configuration.
93
+
94
+ ## Running from Source
95
+
96
+ In addition to installing from PyPI, you can obtain the complete source code from GitHub.
97
+
98
+ **1. Clone the repository**
99
+
100
+ ```bash
101
+ git clone https://github.com/Yjuncc/hostpulse.git
102
+ ```
103
+
104
+ **2. Enter the project directory**
105
+
106
+ ```bash
107
+ cd hostpulse
108
+ ```
109
+
110
+ **3. Create and activate a virtual environment**
111
+
112
+ ```bash
113
+ python3.14 -m venv .venv
114
+ source .venv/bin/activate
115
+ ```
116
+
117
+ **4. Install dependencies**
118
+
119
+ ```bash
120
+ python -m pip install -r requirements.txt
121
+ ```
122
+
123
+ **5. Run HostPulse**
124
+
125
+ ```bash
126
+ python hostpulse.py
127
+ ```
128
+
129
+ You can also run the program from the project directory without activating the virtual environment:
130
+
131
+ ```bash
132
+ .venv/bin/python hostpulse.py
133
+ ```
134
+
135
+ ## Project and Releases
136
+
137
+ HostPulse uses Git for version control. Its source code is hosted on GitHub, and Python packages are distributed through PyPI.
138
+
139
+ - **GitHub repository**: [Yjuncc/hostpulse](https://github.com/Yjuncc/hostpulse)
140
+ - **GitHub Releases**: [View official releases](https://github.com/Yjuncc/hostpulse/releases)
141
+ - **PyPI**: [HostPulse package](https://pypi.org/project/hostpulse/)
142
+
143
+ GitHub provides the complete source code, project documentation, and version release history.
144
+
145
+ PyPI provides Python installation packages so users can install HostPulse through pip.
146
+
147
+ ## Current Version
148
+
149
+ **HostPulse v0.1.0 — Initial Release**
150
+
151
+ This version provides basic system status checking through a Python command-line interface.
152
+
153
+ ## Open Source License
154
+
155
+ HostPulse is licensed under the MIT License.
156
+
157
+ You may use, modify, and distribute the project's source code under the terms of the MIT License.
158
+
159
+ For the complete license terms, see [LICENSE](https://github.com/Yjuncc/hostpulse/blob/main/LICENSE).
160
+
161
+ Copyright (c) 2026 Yjunc
@@ -0,0 +1,7 @@
1
+ hostpulse.py,sha256=FlDBuDj5Dxrp--t-I0kJ-TzYjms3XaqrqRjAwabFLVM,976
2
+ hostpulse-0.1.0.dist-info/licenses/LICENSE,sha256=J5s2lQC0UGG4keEeH3jXXlv1a_Y697eWPySnzmmLbyk,1071
3
+ hostpulse-0.1.0.dist-info/METADATA,sha256=TKNglGXjZ_ur5LFD30fnxZLbo-FRZghTKIlMYrWSGUc,4634
4
+ hostpulse-0.1.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
5
+ hostpulse-0.1.0.dist-info/entry_points.txt,sha256=DDU1ReqTZR_VmzPjUVbnJBQruO_Z-vxEWUzxCw2Hod4,45
6
+ hostpulse-0.1.0.dist-info/top_level.txt,sha256=qsWh0zwhIQ3j0KO3HqN3_ruSvyw6DTKiRemBFNpKLJY,10
7
+ hostpulse-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ hostpulse = hostpulse:main
@@ -0,0 +1,10 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Yjunc
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
10
+
@@ -0,0 +1 @@
1
+ hostpulse
hostpulse.py ADDED
@@ -0,0 +1,32 @@
1
+ import os
2
+ import platform
3
+ import time
4
+
5
+ import psutil
6
+
7
+ def main():
8
+ print("HostPulse 啟動成功!")
9
+ print("操作系統:", platform.system())
10
+ print("處理器架構:", platform.machine())
11
+ print("邏輯處理器數量:", os.cpu_count())
12
+
13
+ hostname = platform.node()
14
+ short_hostname = hostname.removesuffix(".local")
15
+ print("主機名稱:", short_hostname)
16
+
17
+ memory = psutil.virtual_memory()
18
+ print("內存總量 (GiB):", round(memory.total / (1024 ** 3), 2))
19
+ print("內存使用率:", memory.percent, "%")
20
+
21
+ disk = psutil.disk_usage("/")
22
+ print("硬盤容量(GiB):", round(disk.total / (1024 ** 3), 2))
23
+ print("硬盤使用率:", disk.percent, "%")
24
+
25
+ cpu_usage = psutil.cpu_percent(interval=1)
26
+ print("CPU 使用率:", cpu_usage, "%")
27
+
28
+ uptime_seconds = time.time() - psutil.boot_time()
29
+ print("距離上次開機(小時):", round(uptime_seconds / 3600, 1))
30
+
31
+ if __name__ == "__main__":
32
+ main()