Skip to main content

cybertqdm

cybertqdm is a wrapper around tqdm that will also display a progress bar 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.

cybertqdm running on the e-ink display)

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:

  1. One Raspberry Pi Pico 2 with a (pre-)soldered header. A Pi Pico might also work but cybertqdm is only tested on a Pi Pico 2.
  2. One Waveshare e-paper 2.13 inch display module (250×122 pixels, black and white)
  3. 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.

  1. Install MicroPython on your Raspberry Pico 2 following the official instructions.

  2. 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 mpremote using 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 print init etc. if everything worked correctly. You can close the running script by pressing Ctrl-C.
    • Reset your Pico 2 using mpremote reset which also starts main.py automatically.
    • 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.7

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

Source distribution (sdist)

Source distribution for cybertqdm 0.2.7
File Size Uploaded Provenance Actions
cybertqdm-0.2.7.tar.gz 11.2 kB Without provenance Details for cybertqdm-0.2.7.tar.gz

Built distribution (wheel)

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

Total release size: 24.3 kB

Release files / cybertqdm-0.2.7.tar.gz

Download URL cybertqdm-0.2.7.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9cb6dd46d73422f173e0d1498448c632b0d7f4d1b3dff2e68a40df2f48fbf393
BLAKE2b-256 checksum
How to use checksums
fa38d069ab5a25038a9845b65e190e0de2d070092e0b71796c9ebee387306feb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / cybertqdm-0.2.7-py3-none-any.whl

Download URL cybertqdm-0.2.7-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9c686865dbf63910e39fc45b8f0d87d54543a7b7690a047473a9aa6b2a2a05fa
BLAKE2b-256 checksum
How to use checksums
870558716196cd06f6968729293e7319da5ef8a79ee293b751bdafbc85e5b529
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for cybertqdm 0.2.7

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.

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