Skip to main content

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 protocol
  • transport="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/tcp
  • examples/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

wave_python_sdk-0.2.1.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

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

wave_python_sdk-0.2.1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file wave_python_sdk-0.2.1.tar.gz.

File metadata

  • Download URL: wave_python_sdk-0.2.1.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for wave_python_sdk-0.2.1.tar.gz
Algorithm Hash digest
SHA256 9a87d65bf6257ea6c6d66d3f52049d4d734511b731c26aafa604dbedbb97397d
MD5 3f5478f050a0df1b702991837a989451
BLAKE2b-256 ec1c171ac56cb8725db328d721870427eac1cc74da15eb1fc3e52534409919dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for wave_python_sdk-0.2.1.tar.gz:

Publisher: release.yml on C4erries/wave-python-sdk

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

File details

Details for the file wave_python_sdk-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for wave_python_sdk-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2dae0ea599bd6d11617ae812d78a9b5664e3d317cf9a1a7633238dc606d76efd
MD5 d67557873f8060e8fba33d8269ad92e2
BLAKE2b-256 706de6d7097f3cf7e93af01bbc12d4afc6b1975cb9bc672d936556c4dba403de

See more details on using hashes here.

Provenance

The following attestation bundles were made for wave_python_sdk-0.2.1-py3-none-any.whl:

Publisher: release.yml on C4erries/wave-python-sdk

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