semvec/pypi-packages huggingface dataset:
togomq-grpc 0.1.12
Auto-generated gRPC Python client for TogoMQ
Requires Python: >=3.9

# TogoMQ Auto-Generated Protos Package

This directory contains Python source files automatically generated from Protocol Buffer (`.proto`) definitions.

---

**About TogoMQ**

This package is maintained by [TogoMQ](https://togomq.io), a SaaS company providing modern messaging solutions.

## Overview

- **Purpose:** Provides Python types and gRPC service stubs for use in applications.
- **Do not edit:** All files in this package are generated. Manual changes will be overwritten.
- **Regeneration:** To update, re-run the Protocol Buffer compiler (`protoc`) with the appropriate plugins.

## Usage

Use the generated Python classes in your project to work with the message types and services.

### Install with pip

```sh
pip install togomq-grpc
```

### Usage Example

```python
from mq.v1 import mq_pb2
from mq.v1 import mq_pb2_grpc
import grpc

# All message models are in mq_pb2:
# - PubMessageRequest, PubMessageResponse
# - SubMessageRequest, SubMessageResponse
# - CountMessagesRequest, CountMessagesResponse
# - HealthCheckRequest, HealthCheckResponse

# Create a message
request = mq_pb2.PubMessageRequest()
request.topic = "orders/new"
request.body = b"Order data"
request.postpone = 0
request.retention = 3600
request.variables["order_id"] = "12345"

# Create a gRPC channel and client stub
channel = grpc.insecure_channel('localhost:50051')
stub = mq_pb2_grpc.MqServiceStub(channel)

# Make a gRPC call
response = stub.HealthCheck(
    mq_pb2.HealthCheckRequest(message="Hello")
)
print(f"Service alive: {response.alive}")
```

---

*Generated by bufbuild/buf and the Protocol Buffer compiler.*