# simplestreamer
This is a tiny (< 150 loc) peer-to-peer data-streaming library designed for high-frequency status data. It uses pickle underneath to serialize the data, so you can dump any python object through it.
You can install it with pip install simplestreamer
Here is a quick example of how to use it. Hopefully it is self-explanatory enough.
node 1 code:
# just dumps time data into the streamer at 100 hz
import simplestreamer
import time
streamer = simplestreamer.SimpleStreamer(5200)
while True:
streamer.send_data({"current time.time()": time.time()})
time.sleep(0.01)
node 2 (and 3, and 4, and so on) code:
# subscribes to the stream from node 1 and periodically reads the data
import simplestreamer
import time
streamer = simplestreamer.SimpleStreamer(5201)
streamer.subscribe("127.0.0.1", 5200, "streamer 1")
# You can optionally configure the rate at which the remote streamer sends you data
#streamer.subscribe("127.0.0.1", 5200, "streamer 1", updates_per_sec=1.5)
while True:
print(streamer.get_data("streamer 1"))
time.sleep(0.5)
Metadata
Release files for simplestreamer 2016.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| simplestreamer-2016.0.3.tar.gz | 3.4 kB | Without provenance | Details for simplestreamer-2016.0.3.tar.gz |
Release files / simplestreamer-2016.0.3.tar.gz
| Download URL | simplestreamer-2016.0.3.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
df6954a58fcafad2881dae9de593e40eaa0f34d53a42aea6267a36fd9ca27915
|
|
BLAKE2b-256 checksum How to use checksums |
c20cbbce0d1f3ba282125cd58a4d474a01d4f285934f4c23bf5b5b93e2983064
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for simplestreamer 2016.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.