Autobahn Client
Project description
Autobahn Client
A Python client for Autobahn.
Installation
pip install autobahn_client
Usage
from autobahn_client import AutobahnClient
from autobahn_client.proto.message_pb2 import MessageType
# Create a client
client = AutobahnClient()
# Connect to the service
client.connect()
# Publish a message to a topic
message = client.publish("my-topic", "Hello, world!")
print(f"Published message to {message.topic}")
# Subscribe to a topic
subscription = client.subscribe("another-topic")
print(f"Subscribed to {subscription.topic}")
Working with Protocol Buffers
This package uses Protocol Buffers for message serialization. The protobuf definitions are located in the src/proto/ directory.
Compiling Proto Files
If you make changes to the .proto files, you need to recompile them:
# Install the protobuf compiler if you haven't already
# macOS: brew install protobuf
# Ubuntu/Debian: apt-get install protobuf-compiler
# Compile the proto files
python scripts/compile_protos.py
License
MIT
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
autobahn_client-0.1.0.tar.gz
(6.2 kB
view details)
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 autobahn_client-0.1.0.tar.gz.
File metadata
- Download URL: autobahn_client-0.1.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e843a4d6f472d0a109a4fc7a0cc6fbcaf8b7b583b8aa1c70495218001c4277ef
|
|
| MD5 |
7b92628b4c79ca74440c25ea1a202c50
|
|
| BLAKE2b-256 |
a19a2870ee30bb10338040784a7e2aadb5041999c2e9085f942533766061964b
|
File details
Details for the file autobahn_client-0.1.0-py3-none-any.whl.
File metadata
- Download URL: autobahn_client-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
54bf966c17b158f597a9d65d3b92c1536110e6385911827bc335b1b5c3154c78
|
|
| MD5 |
5ad3a303d3823b9f54172d8e93356aa8
|
|
| BLAKE2b-256 |
89a8d09d1252af65d88727c2eb3a788c387ba136f4cf62cc8eee8a41edc1765e
|