Skip to main content

A simple STOMP client for WebSocket with asyncio support

Project description

auto-stomp - Async STOMP over WebSocket for Python

auto-stomp is an asyncio-based STOMP (Simple/Streaming Text Oriented Messaging Protocol) client that supports WebSocket connections. It's designed for use with brokers like Spring STOMP endpoints over WebSocket.

Installation

pip install async-stomp-client

Or, if you're building from source:

git clone https://github.com/your-username/async-stomp-client.git
cd async-stomp-client
pip install .

Quick Start

import asyncio
from auto_stomp import Client

async def main():
    stomp = Client(brockerURL="ws://localhost:8080/signaling", debug=True)

    await stomp.connect()

    await stomp.subscribe(
        id="1", 
        destination="/topic/offer", 
        callback=lambda body: print(f"Received offer: {body}")
    )

    await stomp.send(destination="/app/offer", body="Hello, World!")

    await stomp.run_forever()

asyncio.run(main())

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

auto-stomp-0.0.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

auto_stomp-0.0.2-py3-none-any.whl (4.5 kB view details)

Uploaded Python 3

File details

Details for the file auto-stomp-0.0.2.tar.gz.

File metadata

  • Download URL: auto-stomp-0.0.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.2

File hashes

Hashes for auto-stomp-0.0.2.tar.gz
Algorithm Hash digest
SHA256 1e76dbe1d4f686d66d44a1c5186dffc9c03857d41bfeb6eb74fe917a89243f3c
MD5 e9d294cf1474ffab1f29cdf805024785
BLAKE2b-256 aa523431abe5f545258fe19a9989f9bf8f281836bb92bd2eb3717cac5a5ba89e

See more details on using hashes here.

File details

Details for the file auto_stomp-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: auto_stomp-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.2

File hashes

Hashes for auto_stomp-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c1af9bbc9c6c2db36f24c3b4292bda03bdc8ccb7f4d1893a3812698aadcd75e4
MD5 694ea887fbf1e605305008c23d7c552c
BLAKE2b-256 81d3a84ef70a7ed2746aee28971f741f6721c842b57192706fb0f73b02c0a93e

See more details on using hashes here.

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