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.2.tar.gz (51.0 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.2-py3-none-any.whl (33.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: syncstream-1.2.2.tar.gz
  • Upload date:
  • Size: 51.0 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.2.tar.gz
Algorithm Hash digest
SHA256 80b18e1ba6251c6cfc0779b334e63b73391b19d34520d051d45accdfa9da6d8f
MD5 9f457abc85e337677f0be6d0911380b4
BLAKE2b-256 6b62aca061cfe15de00348d9faaea387242cbcdee453c1b65f0ab48f5b0948d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for syncstream-1.2.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: syncstream-1.2.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a888a3f6cc588230fb1cea3f8f4c6492c7c49ca191dcb6a44de6b26eb6ff5516
MD5 6052335e750e9e44c58938d1071482b1
BLAKE2b-256 b6ab8efb7580b663b89c49d65b712a2b32d7b3fe3b32dbdad5631902424dbca9

See more details on using hashes here.

Provenance

The following attestation bundles were made for syncstream-1.2.2-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