Skip to main content

A wrapper around Python’s multiprocessing, providing support for tqdm progress bars and shared arguments.

Provides simple, familiar interface with addiitonal superpowers.

Installation

pip install enhanced_multiprocessing

Example usage

from enhanced_multiprocessing import Pool

def add_n(x, n):
    return x + n

# the number of processes will be set to number of cores - 1 by default
p = Pool()

# will apply add_n to the element list of length three with n=5, showing a nice progress bar along
result = p.imap(add_n, [1, 2, 3], shared_args=(5, ))

assert list(result) == [6, 7, 8]

History

Originally published at kn-bibs/pathways-analysis, then further developed for krassowski/drug-disease-profile-matching.

Metadata

Release files for enhanced-multiprocessing 1.0

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

Source distribution (sdist)

Source distribution for enhanced-multiprocessing 1.0
File Size Uploaded
enhanced_multiprocessing-1.0.tar.gz 4.0 kB Details

Release files / enhanced_multiprocessing-1.0.tar.gz

Download URL enhanced_multiprocessing-1.0.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0a44c38486941f2d4c375d3de60d824f81854192604c3702462212cdf465d0a7
BLAKE2b-256 checksum
How to use checksums
8a91b02bedf6210cdb67553c65e245c720280cefadbb9cf795af50159a7e8e13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2

Release history Release notifications | RSS feed

This release

1.0 This release

1 release file

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