Skip to main content

PyHw, a neofetch-like system information fetching tool

Downloads PyPI - Version Static Badge

Static Badge Static Badge Static Badge Static Badge

Static Badge Static Badge Static Badge Static Badge Static Badge Static Badge

PyHw, a neofetch-like command line tool for fetching system information but written mostly in Python.

This project is a Python reimplementation of neofetch and references the 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 🤔).

demo

1. Install

There are already a lot of similar tools so you can choose any of them; they're all essentially no different. If you want to try this tool, There are two convenient ways to install it.

1.1 Install by pipx

pipx is an amazing tool to help you install and run applications written in Python. It is more like brew or apt. You can find more information about it here pipx. pipx is available on almost all major platforms and is usually provided by the corresponding package manager. If you haven't used pipx before, you can refer to this document to install it.

You can install pyhw by the following command:

pipx install pyhw

To upgrade pyhw:

pipx upgrade pyhw

You can then use this tool directly from the command line with the following command, just like neofetch.

pyhw

1.2 Install by pip

In any case, pip is always available, so if you can't install this program using pipx, you can install pyhw by the following command:

pip install pyhw

To upgrade pyhw:

pip install pyhw -U
# or
pip install pyhw --upgrade

You can then use this tool directly from the command line with the following command, just like neofetch.

pyhw
# or
python -m pyhw

Please note that the command line entry for pyhw is created by pip, and depending on the user, this entry may not in the system PATH. If you encounter this problem, pip will give you a prompt, follow the prompts to add entry to the system PATH.

2. Usability

Tested Platform

The following platforms have been tested and are known to work with this package:

  • macOS: arm64, x86_64
  • Linux: arm64, x86_64, riscv64, ppc64le, mips64el, s390x
  • FreeBSD: arm64, x86_64
  • Windows 10: x86_64
  • Windows 11: arm64, x86_64

For more detailed information, please refer to Tested Platform.

Please note that this package requires Python 3.9, so very old versions of Linux may not be supported.

Features

The functionality of this package varies slightly on different operating systems and architectures, please refer to this documentation for details.

3. Add Logo

  1. Create a file named <os>.pyhw in logo/ascii folder
  2. Modify colorConfig.py file to add a new logo style
  3. Update pyhwUtil.py to enable new logo style.
  4. You may create a new PR to add your logo style to the main repository.

4. Build from source

4.1 Dependencies

This package was originally implemented in pure python and only depends on the python standard library. However, in subsequent development, the code for the pci part was separated into a separate package pypci-ng, which can be obtained using pip (or check out this GitHub repository).

4.2 Build tools

Make sure the following Python build tools are already installed.

  • setuptools
  • build
  • twine

Newer versions of twine requires the following dependencies are up to date:

  • setuptools
  • build
  • twine
  • packaging

4.3 Build package

clone the project, and run:

python -m build

After the build process, the source package and the binary whl package can be found in the dist folder. Then you can use the following command to install the new package.

pip install dist/*.whl --force-reinstall

4.4 Build Full Feature package

Currently, build process relay on swiftc and macOS IOKit framework. To build Full Feature Package from source, you need a Mac machine with macOS 11 and newer.

Simply type:

make build
make install

5. Test Package

If you have docker installed, you can test this package through docker by type:

make test # local build
make test-pypi # release version

6. Troubleshooting

6.1 Important note about debian 12:

If you use system pip to install pyhw, you will encounter this problem on debian12 and some related distributions (like Ubuntu 24.04):

error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    For more information visit http://rptl.io/venv

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.

This is due to the fact that system python is not supposed to be managed by pip. You can simply use pipx to install pyhw. Or you can use a virtual environment (venv), conda environment or force remove this restriction (not recommended).

Release files for pyhw 0.16.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyhw 0.16.12
File Size Uploaded
pyhw-0.16.12.tar.gz 200.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyhw 0.16.12
File Interpreter ABI Platform
pyhw-0.16.12-py3-none-any.whl Python 3 none any Details

Total release size: 405.3 kB

Release files / pyhw-0.16.12.tar.gz

Download URL pyhw-0.16.12.tar.gz
Size 200.1 kB
Tags Source
SHA-256 checksum
How to use checksums
8fb496a4b67341e9e2508acadc0e17b0e09a734872977bca47109e2a87cc5a8a
BLAKE2b-256 checksum
How to use checksums
c48d22a6ab754a39f149fc688683189eed63d921d3a6192a9320d90e20a534e3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Release files / pyhw-0.16.12-py3-none-any.whl

Download URL pyhw-0.16.12-py3-none-any.whl
Size 205.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cd620ab28374877a351382cc5b3108dc521dc066194fe4200b7eaab671d06f97
BLAKE2b-256 checksum
How to use checksums
553fe086889438c177dad3624ec08d74670fa62a84037b123ea59350b97603c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.21

Release history Release notifications | RSS feed

This release

0.16.12 This release

2 release files

0.16.9

2 release files

0.16.8

2 release files

0.16.6

2 release files

0.16.5

2 release files

0.16.4

2 release files

0.16.3

2 release files

0.16.1

2 release files

0.16.0

2 release files

0.15.3

2 release files

0.15.2

2 release files

0.15.1

2 release files

0.15.0

2 release files

0.14.5

2 release files

0.14.4

2 release files

0.14.1

2 release files

0.14.0

2 release files

0.13.4

2 release files

0.13.3

2 release files

0.13.2

2 release files

0.13.1

2 release files

0.13.0

2 release files

0.12.5

2 release files

0.12.2

2 release files

0.12.1

2 release files

0.12.0

2 release files

0.11.9

2 release files

0.11.8

2 release files

0.11.7

2 release files

0.11.6

2 release files

0.11.5

2 release files

0.11.4

2 release files

0.11.3

2 release files

0.11.2

2 release files

0.11.1

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.4

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.8

2 release files

0.6.7

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page