Python SDK for wave-mq binary protocol
Project description
wavemq
wavemq is the Python SDK for wave-mq. It provides one client API over two transports:
transport="tcp"for the custom binary protocoltransport="http"for the broker HTTP API
TCP is the default and is the best fit for binary payloads. HTTP is useful for preview flows and simpler integrations.
Install
python -m pip install wave-python-sdk
Quick start
from wavemq import WaveMQClient
with WaveMQClient("127.0.0.1:7912") as client:
client.ping()
client.create_topic("demo", partitions=1, replication_factor=1)
client.produce("demo", 0, ["hello"], key="demo-key")
result = client.fetch("demo", 0, offset=0)
print(result.records[0].value)
HTTP uses the same surface:
from wavemq import WaveMQClient
with WaveMQClient("http://127.0.0.1:8090", transport="http") as client:
client.ping()
client.create_topic("demo", partitions=1, replication_factor=1)
client.produce("demo", 0, ["hello"], key="demo-key")
result = client.fetch("demo", 0, offset=0)
print(result.records[0].value)
Helper API
For tiny scripts and preview examples, the client also exposes additive helpers:
ensure_topic(...)produce_one(...)produce_many(...)fetch_from_offset(...)fetch_latest(...)resolve_consume_offset(...)consume_poll(...)
Examples
Runnable examples live in:
examples/python/sdk/tcpexamples/python/sdk/http
The TCP folder also contains simple in-file producer/consumer/replay scripts for quick manual checks and offset reruns.
Notes
- Use
transport="tcp"if you need raw bytes and the binary protocol. - Use
transport="http"if you want a broker-address-only integration path. - The package is intentionally small and has no runtime dependencies beyond the standard library.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file wave_python_sdk-0.2.0.tar.gz.
File metadata
- Download URL: wave_python_sdk-0.2.0.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4f0d03dee32560c9b9dd667c7fa254914cd03cac58b649712ef4e5dec71e31c
|
|
| MD5 |
9f39577907a97ea8ecb4c9bc28cbb614
|
|
| BLAKE2b-256 |
36bb4929bfc68a9803ab9c9e5baef5332204e3b6c6fc3dd94cb698d8d749f7dd
|
Provenance
The following attestation bundles were made for wave_python_sdk-0.2.0.tar.gz:
Publisher:
release.yml on C4erries/wave-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wave_python_sdk-0.2.0.tar.gz -
Subject digest:
c4f0d03dee32560c9b9dd667c7fa254914cd03cac58b649712ef4e5dec71e31c - Sigstore transparency entry: 1206126872
- Sigstore integration time:
-
Permalink:
C4erries/wave-python-sdk@a82515b7525279ba5dffa9e530a11b9963fee0c1 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/C4erries
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a82515b7525279ba5dffa9e530a11b9963fee0c1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file wave_python_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: wave_python_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5fa4b44de3eaf5f5da5318fed313fc634b30f2cd104e7d4e6670a50efa503cea
|
|
| MD5 |
f55bce7ff064ed53a181d7be4bd85f41
|
|
| BLAKE2b-256 |
ff874d0351e9295585ae4024c4945fb6b81ff93f402d5a1ecebcdb321d670e07
|
Provenance
The following attestation bundles were made for wave_python_sdk-0.2.0-py3-none-any.whl:
Publisher:
release.yml on C4erries/wave-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
wave_python_sdk-0.2.0-py3-none-any.whl -
Subject digest:
5fa4b44de3eaf5f5da5318fed313fc634b30f2cd104e7d4e6670a50efa503cea - Sigstore transparency entry: 1206126882
- Sigstore integration time:
-
Permalink:
C4erries/wave-python-sdk@a82515b7525279ba5dffa9e530a11b9963fee0c1 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/C4erries
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@a82515b7525279ba5dffa9e530a11b9963fee0c1 -
Trigger Event:
push
-
Statement type: