Skip to main content

A python tool for synchronize the messages from different threads, processes or hosts.

Project description

Sync-stream

Banner

GitHub release (latest SemVer) GitHub all releases GitHub PyPI - Downloads

GitHub Actions (Build) GitHub Actions (Release)

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:

  1. Use syncstream.LineBuffer: Multiple threads are created. The messages (stdout) from different threads are required to be collected.
  2. Use syncstream.LineProcBuffer in the main process, and syncstream.LineProcMirror in the sub-processes: Multiple sub-processes are created on the same device. The stdout / stderr of each process is redirected to a LineProcMirror, and the results are collected by LineProcBuffer.
  3. 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 independent LineFileBuffer pointing to the same log files.
  4. Use syncstream.LineHostBuffer on the server side, and syncstream.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 a LineHostMirror, and the results would be collected by LineHostBuffer.

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


Download files

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

Source Distribution

syncstream-1.2.1.tar.gz (50.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

syncstream-1.2.1-py3-none-any.whl (33.7 kB view details)

Uploaded Python 3

File details

Details for the file syncstream-1.2.1.tar.gz.

File metadata

  • Download URL: syncstream-1.2.1.tar.gz
  • Upload date:
  • Size: 50.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for syncstream-1.2.1.tar.gz
Algorithm Hash digest
SHA256 f2821c2b799c46ca8862339ac28dfd0cac3103945bae1d8344f16c7395f7b458
MD5 fad7ceb5cd9c9b8032c59c01995fcdd0
BLAKE2b-256 b8a08bc2bfcc6b45d98db043730a37c95965334a85eeb099a1fbf954d0b478f0

See more details on using hashes here.

Provenance

The following attestation bundles were made for syncstream-1.2.1.tar.gz:

Publisher: python-publish.yml on cainmagi/sync-stream

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file syncstream-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: syncstream-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 33.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for syncstream-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 07504c8806c9d439e19aa7600deeda6f9c70d332932b24af88d5ebb32b24191d
MD5 ae8b87235fd1e52ce70e487096e9b9e7
BLAKE2b-256 00dfe9a0b27649f5db2abac37db0ed22fa909c7863f9d3c3c644714c26ad56f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for syncstream-1.2.1-py3-none-any.whl:

Publisher: python-publish.yml on cainmagi/sync-stream

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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