Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

progrock

The progrock.MultiProgress class is used in conjunction with the methods exposed at the module level such as progrock.increment to create a full-screen experience allowing the user to track the progress of individual processes as they perform their work.

Version Downloads License

Installation

progrock may be installed via the Python package index with the tool of your choice. I prefer pip:

pip install progrock

Documentation

https://progrock.readthedocs.org

Requirements

There are no requirements outside of the Python standard library.

Screenshot

The following image shows the example code listing in action:

http://i.imgur.com/wi9MAdp.png

Example

The following example will create a process for each CPU core on the system that it is run on, displaying the MultiProgress screen. The child processes will iterate 100 times, updating their progress bar and then sleeping up to 1 second.

import progrock
import random

def example_runner(ipc_queue):
    # Update the processes status in its progress box
    progrock.set_status(ipc_queue, 'Running')

    # Increment the progress bar, sleeping up to one second per iteration
    for iteration in range(1, 101):
        progrock.increment(ipc_queue)
        progrock.increment_app(ipc_queue)
        time.sleep(random.random())

processes = []

# Create the MultiProgress instance
steps = multiprocessing.cpu_count() * 100
with MultiProgress('Example', steps=steps) as progress:

    # Spawn a process per CPU and append it to the list of processes
    for proc_num in range(0, multiprocessing.cpu_count()):
        processes.append(progress.new_process(example_runner))

    # Wait for the processes to run
    while any([p.is_alive() for p in processes]):
        time.sleep(1)

Version History

Available at https://progrock.readthedocs.org

Release files for progrock 0.3.1

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

Source distribution (sdist)

Source distribution for progrock 0.3.1
File Size Uploaded
progrock-0.3.1.tar.gz 7.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for progrock 0.3.1
File Interpreter ABI Platform
progrock-0.3.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 18.7 kB

Release files / progrock-0.3.1.tar.gz

Download URL progrock-0.3.1.tar.gz
Size 7.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f6c1a821608c5af987dadebf4089f33622976efa9e53aa7f6478ff7a55928cd7
BLAKE2b-256 checksum
How to use checksums
bab45feb067b51840afbabd0a2aaeeceb4dc64705e6ca341de6f3f7ff94c59c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / progrock-0.3.1-py2.py3-none-any.whl

Download URL progrock-0.3.1-py2.py3-none-any.whl
Size 10.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
475093188b0014b0691618cc50188c3a5e873572ba56a210f6e29785c529ea4a
BLAKE2b-256 checksum
How to use checksums
4a907b8804230ca145637e3ef895cce9e655ad1297db2638635509dcb35f8b4a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
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