pyhw 0.3.7__tar.gz → 0.4.0__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- {pyhw-0.3.7/src/pyhw.egg-info → pyhw-0.4.0}/PKG-INFO +5 -2
- {pyhw-0.3.7 → pyhw-0.4.0}/README.md +3 -1
- {pyhw-0.3.7 → pyhw-0.4.0}/pyproject.toml +4 -1
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/gpu/linux.py +10 -11
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/nic/linux.py +11 -13
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/nic/macos.py +7 -0
- {pyhw-0.3.7 → pyhw-0.4.0/src/pyhw.egg-info}/PKG-INFO +5 -2
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw.egg-info/SOURCES.txt +1 -0
- pyhw-0.4.0/src/pyhw.egg-info/requires.txt +1 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/LICENSE +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/MANIFEST.in +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/setup.cfg +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/__init__.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/__main__.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/__init__.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/backendBase.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/cpu/__init__.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/cpu/cpuBase.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/cpu/cpuInfo.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/cpu/linux.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/cpu/macos.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/gpu/__init__.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/gpu/gpuBase.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/gpu/gpuInfo.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/gpu/macos.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/host/__init__.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/host/hostBase.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/host/hostInfo.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/host/linux.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/host/macos.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/host/windows.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/kernel/__init__.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/kernel/kernelBase.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/kernel/kernelInfo.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/kernel/unix.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/kernel/windows.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/memory/__init__.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/memory/linux.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/memory/macos.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/memory/memoryBase.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/memory/memoryInfo.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/metal/t.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/nic/__init__.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/nic/nicBase.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/nic/nicInfo.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/os/__init__.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/os/linux.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/os/macos.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/os/osBase.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/os/osInfo.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/shell/__init__.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/shell/shellBase.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/shell/unix.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/title/__init__.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/title/titleBase.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/title/unix.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/title/windows.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/uptime/__init__.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/uptime/linux.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/uptime/macos.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/uptime/uptimeBase.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/backend/uptime/uptimeInfo.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/frontend/__init__.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/frontend/color/__init__.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/frontend/color/colorConfig.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/frontend/color/colorSet.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/frontend/color/colorUtil.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/frontend/frontendBase.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/frontend/logo/__init__.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/frontend/logo/ascii/alpine.pyhw +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/frontend/logo/ascii/arch.pyhw +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/frontend/logo/ascii/armbian.pyhw +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/frontend/logo/ascii/centos.pyhw +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/frontend/logo/ascii/debian.pyhw +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/frontend/logo/ascii/fedora.pyhw +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/frontend/logo/ascii/fedora_small.pyhw +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/frontend/logo/ascii/linux.pyhw +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/frontend/logo/ascii/macOS.pyhw +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/frontend/logo/ascii/raspbian.pyhw +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/frontend/logo/ascii/ubuntu.pyhw +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/frontend/logo/ascii/ubuntu_small.pyhw +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/frontend/logo/logoBase.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/macos.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/pyhwException/__init__.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/pyhwException/pyhwException.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/pyhwUtil/__init__.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/pyhwUtil/pyhwUtil.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw/pyhwUtil/sysctlUtil.py +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw.egg-info/dependency_links.txt +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw.egg-info/entry_points.txt +0 -0
- {pyhw-0.3.7 → pyhw-0.4.0}/src/pyhw.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyhw
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.4.0
|
4
4
|
Summary: PyHw, a neofetch-like command line tool for fetching system information but written mostly in python.
|
5
5
|
Author-email: Xiao Ran <xiaoran.007@icloud.com>
|
6
6
|
License: BSD-3-Clause
|
@@ -13,6 +13,7 @@ Classifier: Operating System :: OS Independent
|
|
13
13
|
Requires-Python: >=3.9
|
14
14
|
Description-Content-Type: text/markdown
|
15
15
|
License-File: LICENSE
|
16
|
+
Requires-Dist: pypci-ng>=0.0.1
|
16
17
|
|
17
18
|
# PyHw
|
18
19
|
[](https://pepy.tech/project/pyhw)
|
@@ -27,7 +28,9 @@ PyHw, a neofetch-like command line tool for fetching system information but writ
|
|
27
28
|
This project is a Python reimplementation of [neofetch](https://github.com/dylanaraps/neofetch) and references the [fastfetch](https://github.com/fastfetch-cli/fastfetch) project for logo style settings. Since this project is implemented in Python, it will be easier to maintain and extend than bash and c implementation. Also, this project only relies on the Python standard library, so you can run it on any device that has a Python environment (I hope so 🤔).
|
28
29
|
|
29
30
|
|
30
|
-
![demo]
|
31
|
+
[//]: # ()
|
32
|
+

|
33
|
+
|
31
34
|
|
32
35
|
|
33
36
|
|
@@ -11,7 +11,9 @@ PyHw, a neofetch-like command line tool for fetching system information but writ
|
|
11
11
|
This project is a Python reimplementation of [neofetch](https://github.com/dylanaraps/neofetch) and references the [fastfetch](https://github.com/fastfetch-cli/fastfetch) project for logo style settings. Since this project is implemented in Python, it will be easier to maintain and extend than bash and c implementation. Also, this project only relies on the Python standard library, so you can run it on any device that has a Python environment (I hope so 🤔).
|
12
12
|
|
13
13
|
|
14
|
-
![demo]
|
14
|
+
[//]: # ()
|
15
|
+

|
16
|
+
|
15
17
|
|
16
18
|
|
17
19
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "pyhw"
|
7
|
-
version = "0.
|
7
|
+
version = "0.4.0"
|
8
8
|
description = "PyHw, a neofetch-like command line tool for fetching system information but written mostly in python."
|
9
9
|
keywords = ["neofetch", "system information", "command line tool", "python", "hardware information", "fastfetch", "fetching"]
|
10
10
|
authors = [
|
@@ -13,6 +13,9 @@ authors = [
|
|
13
13
|
readme = "README.md"
|
14
14
|
license = {text = "BSD-3-Clause"}
|
15
15
|
requires-python = ">=3.9"
|
16
|
+
dependencies = [
|
17
|
+
"pypci-ng>=0.0.1"
|
18
|
+
]
|
16
19
|
classifiers = [
|
17
20
|
"Development Status :: 4 - Beta",
|
18
21
|
"Programming Language :: Python :: 3",
|
@@ -2,6 +2,7 @@ import subprocess
|
|
2
2
|
from .gpuInfo import GPUInfo
|
3
3
|
from ..cpu import CPUDetect
|
4
4
|
from ...pyhwUtil import getArch
|
5
|
+
import pypci
|
5
6
|
|
6
7
|
|
7
8
|
class GPUDetectLinux:
|
@@ -14,19 +15,17 @@ class GPUDetectLinux:
|
|
14
15
|
return self.__gpuInfo
|
15
16
|
|
16
17
|
def __getGPUInfo(self):
|
17
|
-
|
18
|
-
|
19
|
-
except subprocess.SubprocessError:
|
20
|
-
return
|
21
|
-
if len(pci_info) == 0: # no pcie devices found
|
18
|
+
gpu_devices = pypci.PCI().FindAllVGA()
|
19
|
+
if len(gpu_devices) == 0:
|
22
20
|
self.__handleNonePciDevices()
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
21
|
+
else:
|
22
|
+
for device in gpu_devices:
|
23
|
+
if device.subsystem_device_name != "":
|
24
|
+
device_name = f"{device.vendor_name} {device.device_name} ({device.subsystem_device_name})"
|
25
|
+
else:
|
26
|
+
device_name = f"{device.vendor_name} {device.device_name}"
|
27
|
+
self.__gpuInfo.gpus.append(self.__gpuNameClean(device_name))
|
27
28
|
self.__gpuInfo.number += 1
|
28
|
-
if self.__gpuInfo.number == 0:
|
29
|
-
self.__handleNonePciDevices() # fallback to a sbc device detection method
|
30
29
|
|
31
30
|
def __handleNonePciDevices(self):
|
32
31
|
# if detector can't find any VGA/Display/3D GPUs, assume the host is a sbc device, this function is a placeholder for a more advanced method.
|
@@ -2,6 +2,7 @@ import subprocess
|
|
2
2
|
from .nicInfo import NICInfo
|
3
3
|
from ...pyhwUtil import getArch
|
4
4
|
from ...pyhwException import BackendException
|
5
|
+
import pypci
|
5
6
|
|
6
7
|
|
7
8
|
class NICDetectLinux:
|
@@ -14,20 +15,17 @@ class NICDetectLinux:
|
|
14
15
|
return self.__nicInfo
|
15
16
|
|
16
17
|
def __getNICInfo(self):
|
17
|
-
|
18
|
-
|
19
|
-
except subprocess.SubprocessError:
|
20
|
-
return
|
21
|
-
if len(pci_info) == 0: # no pcie devices found
|
18
|
+
nic_devices = pypci.PCI().FindAllNIC()
|
19
|
+
if len(nic_devices) == 0:
|
22
20
|
self.__handleNonePciDevices()
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
21
|
+
else:
|
22
|
+
for device in nic_devices:
|
23
|
+
if device.subsystem_device_name != "":
|
24
|
+
device_name = f"{device.vendor_name} {device.device_name} ({device.subsystem_device_name})"
|
25
|
+
else:
|
26
|
+
device_name = f"{device.vendor_name} {device.device_name}"
|
27
|
+
self.__nicInfo.nics.append(self.__nicNameClean(device_name))
|
28
28
|
self.__nicInfo.number += 1
|
29
|
-
if self.__nicInfo.number == 0:
|
30
|
-
self.__handleNonePciDevices() # fallback to usb detection method
|
31
29
|
|
32
30
|
def __handleNonePciDevices(self):
|
33
31
|
# placeholder for a more advanced method.
|
@@ -40,4 +38,4 @@ class NICDetectLinux:
|
|
40
38
|
return nic_name_clean
|
41
39
|
|
42
40
|
def __sortNICList(self):
|
43
|
-
return self.__nicInfo.nics.sort()
|
41
|
+
return self.__nicInfo.nics.sort()
|
@@ -1,4 +1,5 @@
|
|
1
1
|
from .nicInfo import NICInfo
|
2
|
+
import subprocess
|
2
3
|
|
3
4
|
|
4
5
|
class NICDetectMacOS:
|
@@ -9,3 +10,9 @@ class NICDetectMacOS:
|
|
9
10
|
self.__nicInfo.nics.append("en0")
|
10
11
|
self.__nicInfo.number = 1
|
11
12
|
return self.__nicInfo
|
13
|
+
|
14
|
+
def __getNICInfo(self):
|
15
|
+
# Placeholder for a more advanced method.
|
16
|
+
interfaces = subprocess.run(["bash", "-c", "route get default | grep interface"], capture_output=True, text=True).stdout.strip()
|
17
|
+
|
18
|
+
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pyhw
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.4.0
|
4
4
|
Summary: PyHw, a neofetch-like command line tool for fetching system information but written mostly in python.
|
5
5
|
Author-email: Xiao Ran <xiaoran.007@icloud.com>
|
6
6
|
License: BSD-3-Clause
|
@@ -13,6 +13,7 @@ Classifier: Operating System :: OS Independent
|
|
13
13
|
Requires-Python: >=3.9
|
14
14
|
Description-Content-Type: text/markdown
|
15
15
|
License-File: LICENSE
|
16
|
+
Requires-Dist: pypci-ng>=0.0.1
|
16
17
|
|
17
18
|
# PyHw
|
18
19
|
[](https://pepy.tech/project/pyhw)
|
@@ -27,7 +28,9 @@ PyHw, a neofetch-like command line tool for fetching system information but writ
|
|
27
28
|
This project is a Python reimplementation of [neofetch](https://github.com/dylanaraps/neofetch) and references the [fastfetch](https://github.com/fastfetch-cli/fastfetch) project for logo style settings. Since this project is implemented in Python, it will be easier to maintain and extend than bash and c implementation. Also, this project only relies on the Python standard library, so you can run it on any device that has a Python environment (I hope so 🤔).
|
28
29
|
|
29
30
|
|
30
|
-
![demo]
|
31
|
+
[//]: # ()
|
32
|
+

|
33
|
+
|
31
34
|
|
32
35
|
|
33
36
|
|
@@ -9,6 +9,7 @@ src/pyhw.egg-info/PKG-INFO
|
|
9
9
|
src/pyhw.egg-info/SOURCES.txt
|
10
10
|
src/pyhw.egg-info/dependency_links.txt
|
11
11
|
src/pyhw.egg-info/entry_points.txt
|
12
|
+
src/pyhw.egg-info/requires.txt
|
12
13
|
src/pyhw.egg-info/top_level.txt
|
13
14
|
src/pyhw/backend/__init__.py
|
14
15
|
src/pyhw/backend/backendBase.py
|
@@ -0,0 +1 @@
|
|
1
|
+
pypci-ng>=0.0.1
|
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
|
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
|
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
|
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
|