cybertqdm
cybertqdm is a wrapper around tqdm that will also display on an external e-ink display connected via USB.
It is called cybertqdm because it turns tqdm into a cyber-physical system (Yes, that's an existing term, see the Wikipedia). It will show a process bar as illustrated below.
)
Using cybertqdm
As cybertqdm wraps tqdm it works exactly the same. As a result, normal tqdm output will be printed to the console accompanied by a progess bar on an external e-ink display.
from cybertqdm import cybertqdm
import time
for _ in cybertqdm(range(60), desc="Loosing faith in humanity...", epaper_interval=10):
time.sleep(0.5)
Please note that the e-ink display will not update as fast as the tqdm console output. The refresh interval is controlled by epaper_interval (in seconds).
If no e-ink display is available while using cybertqdm, a warning is displayed and normal tqdm operation is unaffected.
Replacing tqdm with cybertqdm
If you have code that uses tqdm, you might what to use cybertqdm as an optional drop-in replacement, i.e., cybertqdm will only be used if it is present in your environment without adding it as a explicit requirement, e.g. using uv add cybertqdm or pip install cybertqdm.
To use cybertqdm optionally, add the following code to the import block of your script:
# try to load cybertqdm if it is available
try:
from cybertqdm import cybertqdm as tqdm
print("Using cybertqdm to display progress on external e-ink display.")
except ImportError:
from tqdm import tqdm
Installation
In contrast to most other PyPi packages, cybertqdm is a cyber-physical system. Thus, you will have to satisfy certain hardware requirements and software requirements on your embedded device.
Operating System Requirements
cybertqdm has been tested with the following operating systems (OS):
| OS | Supported |
|---|---|
| Linux (Ubuntu) | ✔ |
| macOS (27.2.x) | ✔ |
| Windows (11) | ✔ |
The package might work on other OS as well because it is implemented in pure Python.
When using Linux, access to /dev/ttyACM* is often prohibited. Therefore, you must grant the appropriate permissions to the user running cybertqm:
sudo usermod -aG dialout $USER # Debian/Ubuntu/Fedora
After a logout, cybertqdm should work as expected.
Hardware Requirements
The current version of cybertqdm requires the following components:
- One Raspberry Pi Pico 2 with a (pre-)soldered header. A Pi Pico might also work but
cybertqdmis only tested on a Pi Pico 2. - One Waveshare e-paper 2.13 inch display module (250×122 pixels, black and white)
- One USB-Micro to whatever-you-need-USB data cable
Hardware Setup
You only have to follow these steps once if you don't change your Pico 2 setup afterwards. If you reconnect your Pico 2 it will work directly – on every computer that has cybertqdm installed.
-
Install MicroPython on your Raspberry Pico 2 following the official instructions.
-
Copy the necessary files to your Raspberry Pico 2:
- All necessary files come bundled with the PyPi package. In order to retrieve them, run the following Python script:
import cybertqdm as ctqdm from cybertqdm.diagnostics import show_device_files from importlib.resources import files print("cybertqdm version: "+ ctqdm.__version__) show_device_files()
- The result should look similar to this sample output (assuming you are using uv as a package manager):
cybertqdm version: 0.1.x The following files need to be copied to the device: .../.cache/uv/archive-v0/xQJrc_fVJrWXacY9/lib/python3.15/site-packages/cybertqdm/device/epd.py .../.cache/uv/archive-v0/xQJrc_fVJrWXacY9/lib/python3.15/site-packages/cybertqdm/device/main.py
- Now copy the files to your Pico 2 using
mpremoteusing the paths shown above:
mpremote cp <your_path>main.py :main.py mpremote cp <your_path>epd.py :epd.py- Then test the installation:
mpremote exec "import main"which should printinitetc. if everything worked correctly. You can close the running script by pressing Ctrl-C. - Reset your Pico 2 using
mpremote resetwhich also startsmain.pyautomatically. - To check wheter the communication with the Pico 2 works, run the following diagnosis which provides help to fix common issues:
from cybertqdm.diagnostics import run_checks run_checks()
- If everthing works as expected, the result will look like as shown below. Please note that the actual
/dev/path depends on your operating system. Otherwise, diagnostics and tips to fix your problem will be output.
Pico 2 detected at port: /dev/cu.usbmodem11101 Port opened. Sending: 0/10 ... OK Sending: 5/10 ... OK Sending: 10/10 ... OK Pico 2 works as expected.
Metadata
Release files for cybertqdm 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cybertqdm-0.2.5.tar.gz | 11.8 kB | Without provenance | Details for cybertqdm-0.2.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cybertqdm-0.2.5-py3-none-any.whl | Python 3 | none | any | Details for cybertqdm-0.2.5-py3-none-any.whl |
Total release size: 25.4 kB
Release files / cybertqdm-0.2.5.tar.gz
| Download URL | cybertqdm-0.2.5.tar.gz |
|---|---|
| Size | 11.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
416b676f015d3251bf1a4d6967fc0df7fd30f4916630d9fb4e8ccca57b1cbd69
|
|
BLAKE2b-256 checksum How to use checksums |
8d293add564589a333c25858538797c4bcc3b1279555f49b596248abc79ca452
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / cybertqdm-0.2.5-py3-none-any.whl
| Download URL | cybertqdm-0.2.5-py3-none-any.whl |
|---|---|
| Size | 13.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8a390ad79a2d789728f9dd9fd4c0694a32d555a18e0a5f38cd96167101cd6b3b
|
|
BLAKE2b-256 checksum How to use checksums |
595151631b722661af5fd42ebc673cf26657c3c86bb02b6e1ca28ca1c3f7fd38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for cybertqdm 0.2.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.