Parallel write
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
Metadata
Release files for parallel-write 0.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| parallel_write-0.0.10.tar.gz | 8.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| parallel_write-0.0.10-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 13.5 kB
Release files / parallel_write-0.0.10.tar.gz
| Download URL | parallel_write-0.0.10.tar.gz |
|---|---|
| Size | 8.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ac817b6c20bcae95d91f5aee69fa3877da1310f6f904e1594f1ac23ec0884eb
|
|
BLAKE2b-256 checksum How to use checksums |
778c9b0930297131727b926d16cdb2c8a1bfc966be82b58a553c7737b20d0df7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / parallel_write-0.0.10-py2.py3-none-any.whl
| Download URL | parallel_write-0.0.10-py2.py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
04aed4bd6a0a8171b4c542a9f99744487f0e545cea37aa927e439594747cd0aa
|
|
BLAKE2b-256 checksum How to use checksums |
c70d7bdb5e036ddf278845739b1f91915b124ff994e3578755c9dea47fe56e60
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|