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.0.tar.gz (12.9 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.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

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

Hashes for wave_python_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c4f0d03dee32560c9b9dd667c7fa254914cd03cac58b649712ef4e5dec71e31c
MD5 9f39577907a97ea8ecb4c9bc28cbb614
BLAKE2b-256 36bb4929bfc68a9803ab9c9e5baef5332204e3b6c6fc3dd94cb698d8d749f7dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for wave_python_sdk-0.2.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wave_python_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5fa4b44de3eaf5f5da5318fed313fc634b30f2cd104e7d4e6670a50efa503cea
MD5 f55bce7ff064ed53a181d7be4bd85f41
BLAKE2b-256 ff874d0351e9295585ae4024c4945fb6b81ff93f402d5a1ecebcdb321d670e07

See more details on using hashes here.

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

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