Skip to main content

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.

Python

Platform

pypi

Pypi Pypi-format Pypi-status

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
CPU
cpu_lib
/proc/cpuinfo /usr/sbin/sysctl C:\Windows\System32\wbem\wmic.exe
PCI
gpu_lib
/usr/bin/lspci /usr/sbin/system_profiler C:\Windows\System32\wbem\wmic.exe
Memory
mem_lib
/proc/meminfo /usr/sbin/sysctl N/A
Disk
disk_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 --help for usage instructions.

Linting

pre-commit will ensure linting

Requirement

python -m pip install pre-commit

Usage

pre-commit run --all-files

Pypi Package

pypi-module

https://pypi.org/project/PyArchitecture/

License & copyright

© Vignesh Rao

Licensed under the MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

PyArchitecture-0.1.1-py3-none-any.whl (19.1 kB view details)

Uploaded Python 3

File details

Details for the file PyArchitecture-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: PyArchitecture-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 19.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.14

File hashes

Hashes for PyArchitecture-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9cabcbb7dfb493a664b9bc8e4b8aeda78d0de26c0265c14b9780173dc86eb61a
MD5 058a4697e058016eb76be9a74b823ef4
BLAKE2b-256 b2a3cdfa1d65f6fc62f1f632fde66234078075583649c4d1177f177b4896edd5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page