PyArchitecture is a lightweight python module to get kernel information via OS specific CLI commands.
PyArchitecture is designed to retrieve hard-to-find kernel information like CPU/GPU model name, physical disks, and memory profiles without using any external dependencies.
Although this project does not rely on external dependencies, it does use system tools, as outlined below.
Library / Override | Linux | Darwin (macOS) | Windows |
---|---|---|---|
CPUcpu_lib |
/proc/cpuinfo |
/usr/sbin/sysctl |
C:\Windows\System32\wbem\wmic.exe |
PCIgpu_lib |
/usr/bin/lspci |
/usr/sbin/system_profiler |
C:\Windows\System32\wbem\wmic.exe |
Memorymem_lib |
/proc/meminfo |
/usr/sbin/sysctl |
N/A |
Diskdisk_lib |
/usr/bin/lsblk |
/usr/sbin/diskutil |
C:\Program Files\PowerShell\7\pwsh.exe |
pip install PyArchitecture
Initiate - IDE
import pyarchitecture
if __name__ == '__main__':
all_disks = pyarchitecture.disks.get_all_disks()
print(all_disks)
cpu_info = pyarchitecture.cpu.get_cpu_info()
print(cpu_info)
gpu_info = pyarchitecture.gpu.get_gpu_info()
print(gpu_info)
mem_info = pyarchitecture.memory.get_memory_info()
print(mem_info)
Initiate - CLI
pyarchitecture all
Use
pyarchitecture --help
for usage instructions.
Requirement
python -m pip install gitverse
Usage
gitverse-release reverse -f release_notes.rst -t 'Release Notes'
pre-commit
will ensure linting
Requirement
python -m pip install pre-commit
Usage
pre-commit run --all-files
https://pypi.org/project/PyArchitecture/
© Vignesh Rao
Licensed under the MIT License