Metadata-Version: 2.4
Name: togomq-grpc
Version: 0.1.12
Summary: Auto-generated gRPC Python client for TogoMQ
Home-page: https://github.com/TogoMQ/togomq-grpc-python
Author: Enter Pages Pro Ltd
Author-email: Enter Pages Pro Ltd <dev@enterpages.co.uk>
Project-URL: Homepage, https://togomq.io
Project-URL: Bug Tracker, https://github.com/TogoMQ/togomq-grpc-python/issues
Project-URL: Documentation, https://togomq.io
Project-URL: Source Code, https://github.com/TogoMQ/togomq-grpc-python
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: grpcio>=1.60.0
Requires-Dist: protobuf>=5.29.0
Provides-Extra: dev
Requires-Dist: grpcio-tools>=1.60.0; extra == "dev"
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# 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.*
