A python tool for synchronize the messages from different threads, processes or hosts.
Project description
Sync-stream
This project is designed for providing the synchoronization of the stdout / stderr among different threads, processes, devices or hosts. The package could be used for the following cases:
- Use
syncstream.LineBuffer
: Multiple threads are created. The messages (stdout) from different threads are required to be collected. - Use
syncstream.LineProcBuffer
in the main process, andsyncstream.LineProcMirror
in the sub-processes: Multiple sub-processes are created on the same device. The stdout / stderr of each process is redirected to aLineProcMirror
, and the results are collected byLineProcBuffer
. - Use
syncstream.LineFileBuffer
: Multiple processes are created. These processes may be deployed on different devices (even with different platforms), but all devices could get accessed to the same shared disk. In this case, the message could be shared by locked files. Each process would hold an independentLineFileBuffer
pointing to the same log files. - Use
syncstream.LineHostBuffer
on the server side, andsyncstream.LineHostMirror
on the client side: Multiple processes are deployed on different devices, and they could not share the same disk. In this case, the message are synchronized by the web service. Each process would hold aLineHostMirror
, and the results would be collected byLineHostBuffer
.
The basic package would not contain the file
and host
modules. To install the package, please use the following options:
pip install syncstream[option1,option2...]
Option | Supports |
---|---|
file |
Install dependencies for the file module. The module provides syncstream.LineFileBuffer . |
host |
Install dependencies for the host module. The module provides syncstream.LineHostBuffer , and syncstream.LineHostMirror . |
test |
Install dependencies for running tests. |
dev |
Install dependencies for developers. |
Documentation
View the documentation here: :blue_book: https://cainmagi.github.io/sync-stream/
Update reports
See the versions in the CHANGELOG :spiral_notepad: file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file syncstream-1.2.0.tar.gz
.
File metadata
- Download URL: syncstream-1.2.0.tar.gz
- Upload date:
- Size: 36.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfffbc13c136821994362cc2627cd78f2502a538c1e5a47dd75a8cf87e88d792 |
|
MD5 | 0537ef7cf4c6b23bf6fd4f4c4347d8e8 |
|
BLAKE2b-256 | 386fe9c728f68555b5e866c884c93236893215b042b59efda588a6f62ac595e6 |
File details
Details for the file syncstream-1.2.0-py3-none-any.whl
.
File metadata
- Download URL: syncstream-1.2.0-py3-none-any.whl
- Upload date:
- Size: 33.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8456022911416a033525ea0d546a9ba3f0b50c6a74483d7cd25b77d166e2ed99 |
|
MD5 | 5cfb6a2e5e2375b395c7f57f812396e4 |
|
BLAKE2b-256 | a11178b061de72deeae6c33175513f756da79ec6bd15f20e3c0142e874b133ff |