Nats plugin for Streamz
This a plugin for Streamz that adds stream nodes for writing and reading data from/to NATS.
🛠 Installation
Latest stable version is available on PyPI
pip install streamz_nats
Latest development version can be installed from git repo
pip install git+https://github.com/MarekWadinger/streamz_nats
⚡️ Quickstart
To start working with streamz_nats, follow these 3 steps:
1. Run a standalone NATS cluster locally
docker run -t -d -p 4222:4222 --name streamz-nats nats:latest
2. Create a consumer
The following example creates a consumer of the greet.* topics, where * is
wildcard for any substring, receives incoming messages, prints the content and
ID of messages that arrive, and acknowledges each message to the Pulsar broker.
import nats
from streamz import Stream
s = Stream.from_nats(
'nats://localhost:4222',
['greet.*'],
)
s.map(lambda x: x.decode())
L = s.sink_to_list()
s.start()
while True:
try:
if L:
print(L.pop(-1))
Metadata
Release files for streamz-nats 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| streamz_nats-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for streamz_nats-0.1.0-py3-none-any.whl |
Release files / streamz_nats-0.1.0-py3-none-any.whl
| Download URL | streamz_nats-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5c8c4177624411d5cff465545e1e049f736c03e98bf72fe3e6e2d37cfdbb2bad
|
|
BLAKE2b-256 checksum How to use checksums |
b4d1cb7628fcfe573675e39a61ee50f0c6d3816a8c1d9c45f2c3688c3303f9d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.10.1 Darwin/23.0.0
|
Security for streamz-nats 0.1.0
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.