Skip to main content

manylog

The manylog package facilitates logging and progress reporting in Python multiprocessing settings. Right now, logging across process doesn't work well, except for the natural interleaving that sometimes works acceptably when using the fork multiprocessing context. It supports log messages through the Python standard library's logging module, and progress reported with progress-api.

This package fixes that, through two parts:

  • A listener that runs in a parent process, listening for log messages and progress updates. It republishes these log messages into the parent process's logging infrastructure so filters, handlers, etc. all apply.

  • Logging and progress backend for worker processes that forwards messages to the parent process.

It is agnostic to the specific multiprocessing framework in use, and will work with stdlib multiprocessing, joblib (although Joblib lacks the setup API needed to make it work easily), ipyparallel, Torch multiprocessing, and others. It uses ZeroMQ to route messages between parent and child processes.

Currently, only single-machine multiprocessing is supported, but ZeroMQ will make it easy to add cluster log and progress aggregation in the future.

Example

In the parent:

import multiprocessing.Pool
from manylog import LogListener, init_worker_logging

with LogListener() as ll, mp.Pool(4, init_worker_logging, (ll.address,), None, mp.get_context('spawn')) as pool:
    # use `pool` to schedule parallel work

Log messages from worker processes will be routed through whatever logging and progress configuration you have set up.

Metadata

Release files for manylog 0.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 manylog 0.1.0
File Size Uploaded Provenance Actions
manylog-0.1.0.tar.gz 13.3 kB With provenance Details for manylog-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 24.3 kB

Release files / manylog-0.1.0.tar.gz

Download URL manylog-0.1.0.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ed8fbd4175eee0078a8b0529e736428547bc1ea29d42cff39bdceef179e89fc9
BLAKE2b-256 checksum
How to use checksums
f0151e6e80d2d2ab7bf80d4821c193de664d0ea0678d155822eb3f277d688c06
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2024.

Transparency log

Release files / manylog-0.1.0-py3-none-any.whl

Download URL manylog-0.1.0-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d1728c103d422d5853aaaddc1bd8ff3cbe50757f7290c9312907caacbcf1f271
BLAKE2b-256 checksum
How to use checksums
4805734952810be7e11f7d871f227c8ddc27907c23d76d15faff83845b960ede
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/5.1.1 CPython/3.12.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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2024.

Transparency log

Security for manylog 0.1.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for manylog-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2024.

Transparency log

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