Skip to main content

Writes to many open file objects in parallel.

Project description

Test Status Package Build Codecov Read the Docs

Summary

Parallel write is a Python module for distributing writes between an arbitrary number of open file(like) objects.

Features:

  • Distributes each calls to the proxy object to each passed file objects, so all of them should be in the same state

  • Writes are done in a configurable length thread pool, so you can have slower underlying objects, their slowness won’t add up

  • Compares results from the methods, so despite its name, you can actually read from many objects at once and fail if any of them return different data

Motivation

We often write the same data to local disk (for later caching) and remote (S3 for persistence). The files must be the same, but the tool we’re using may produce binary-different outputs for two subsequent writes (either because PYTHONHASH shuffles things or it includes time-stamps into the compressed output’s metadata, doesn’t matter).

We could write the file locally first, then copy it to S3, but that would take more time and complexity in code. It’s easier to write them at the same time.

How to use this module

See the documentation.

Issues and Discussions

As usual in any GitHub based project, raise an issue if you find any bug or room for improvements.

Version

v0.0.10

Changelog

v0.0.10 (2022-01-14)

v0.0.9 (2022-01-03)

v0.0.8 (2022-01-03)

v0.0.7 (2021-12-16)

v0.0.6 (2021-12-13)

v0.0.5 (2021-12-13)

  • initial version

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parallel_write-0.0.10.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

parallel_write-0.0.10-py2.py3-none-any.whl (4.7 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file parallel_write-0.0.10.tar.gz.

File metadata

  • Download URL: parallel_write-0.0.10.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for parallel_write-0.0.10.tar.gz
Algorithm Hash digest
SHA256 7ac817b6c20bcae95d91f5aee69fa3877da1310f6f904e1594f1ac23ec0884eb
MD5 39b42eae2cd7753814c0d3c005302eae
BLAKE2b-256 778c9b0930297131727b926d16cdb2c8a1bfc966be82b58a553c7737b20d0df7

See more details on using hashes here.

File details

Details for the file parallel_write-0.0.10-py2.py3-none-any.whl.

File metadata

  • Download URL: parallel_write-0.0.10-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for parallel_write-0.0.10-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 04aed4bd6a0a8171b4c542a9f99744487f0e545cea37aa927e439594747cd0aa
MD5 fb0e68d3e862e6751ae420e8b1f1f82c
BLAKE2b-256 c70d7bdb5e036ddf278845739b1f91915b124ff994e3578755c9dea47fe56e60

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page