Metadata-Version: 2.4
Name: autobahn_client
Version: 0.1.0
Summary: Autobahn Client
Author-email: Denis Koterov <denis.koterov@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/godbriger/autobahn
Project-URL: Bug Tracker, https://github.com/godbriger/autobahn/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: protobuf>=4.21.0
Requires-Dist: websockets>=15.0.1
Requires-Dist: asyncio>=3.4.3
Requires-Dist: numpy>=1.24.3
Dynamic: license-file

# Autobahn Client

A Python client for Autobahn.

## Installation

```bash
pip install autobahn_client
```

## Usage

```python
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:

```bash
# 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
