Metadata-Version: 2.4
Name: enos_dms
Version: 0.0.1
Summary: Data subscription with DMS package
Author-email: Xibin <songxibin@gmail.com>
License-Expression: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown

# EnOS Subscription Python Client

This is a Python implementation of the EnOS Subscription Client, tested with Python 3.14.0

## Prerequisites

- Python 3.6+
- `protobuf`
- `grpcio-tools` (for compiling protos, if needed)

## Installation

1. Create a virtual environment:
   ```bash
   python -m venv venv
   source venv/bin/activate  # Linux/Mac
   venv\Scripts\activate     # Windows
   ```

2. Install dependencies:
   ```bash
   pip install protobuf
   ```

## Usage

1. Edit `example.py` with your EnOS Subscription credentials (`HOST`, `PORT`, `ACCESS_KEY`, `SECRET`, `SUB_ID`).
2. Run the example:
   ```bash
   python example.py
   ```
   The script will print received messages (Topic, Partition, Offset, Key, Value) to the console.

## Project Structure

- `client.py`: The main `SubClient` class.
- `utils.py`: Utility functions (signature calculation).
- `proto/`: Protocol Buffer definitions.
- `generated/`: Compiled Protocol Buffer classes.
- `example.py`: Example usage script.

## Notes

- The client uses a TCP connection to communicate with the EnOS Subscription Server.
- It handles Authentication, Subscription, and Pulling messages automatically.
- Offsets are auto-committed periodically (default 3 seconds).
