Python module to get kernel information via OS specific CLI commands
Project description
PyArchitecture
PyArchitecture is a lightweight python module to get kernel information via OS specific CLI commands.
Summary
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 |
Installation
pip install PyArchitecture
Usage
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 --helpfor usage instructions.
Release Notes
Requirement
python -m pip install gitverse
Usage
gitverse-release reverse -f release_notes.rst -t 'Release Notes'
Linting
pre-commit will ensure linting
Requirement
python -m pip install pre-commit
Usage
pre-commit run --all-files
Pypi Package
https://pypi.org/project/PyArchitecture/
License & copyright
© Vignesh Rao
Licensed under the MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file PyArchitecture-0.3.1-py3-none-any.whl.
File metadata
- Download URL: PyArchitecture-0.3.1-py3-none-any.whl
- Upload date:
- Size: 19.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dec56923836b7f19a07d0f92b41db52ba6073f374d841b82bf33749f6d024a85
|
|
| MD5 |
a9d10cae414cdc127d1af0d852262880
|
|
| BLAKE2b-256 |
0afd65498e1dba7dbd0b01825e61db230c1e9aaa0277601f5f9d487072837637
|