Metadata-Version: 2.4
Name: tollmeshcache
Version: 1.1.1
Summary: Python SDK for TollMeshCache - Distributed CRDT-based caching
Home-page: https://github.com/TollMesh/toll-mesh-store
Author: TollMesh Team
Author-email: team@tollmesh.io
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
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: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.28.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.20.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=22.0.0; extra == "dev"
Requires-Dist: flake8>=4.0.0; extra == "dev"
Requires-Dist: mypy>=0.990; extra == "dev"
Provides-Extra: async
Requires-Dist: httpx>=0.24.0; extra == "async"
Provides-Extra: grpc
Requires-Dist: grpcio>=1.50.0; extra == "grpc"
Requires-Dist: grpcio-tools>=1.50.0; extra == "grpc"
Requires-Dist: protobuf>=3.20.0; extra == "grpc"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# TollMeshCache - Python SDK

Distributed CRDT-based caching and coordination for Python applications.

## Installation

```bash
pip install tollmeshcache
```

## Quick Start

```python
from tollmeshcache import Client, ClientConfig

client = Client(ClientConfig(host='localhost', port=8080))

# Job Queues - distributed task processing
job = client.enqueue('tasks', 'my-job', priority=5)
claimed = client.claim('tasks', 'worker-1')
client.complete('tasks', claimed['id'])

# Sorted Sets - O(log n) leaderboards
client.zadd('scores', 100, 'player-1')
client.zadd('scores', 150, 'player-2')
top_scores = client.zrevrange('scores', limit=10)  # highest first

# Streams - append-only event logs
entry = client.xadd('events', {'event': 'login', 'user': 'alice'})
client.xgroup_create('events', 'analytics')
for e in client.xreadgroup('analytics', 'worker-1', 'events'):
    client.xack('events', 'analytics', 'worker-1', e['id'])
```

## Features

- **Job Queues**: Distributed task processing with exactly-once semantics
- **Sorted Sets**: O(log n) leaderboards and rankings
- **Streams**: Append-only event logs with consumer groups
- **CRDT-based**: Eventual consistency without central coordinator
- **Async Support**: Full async/await support
- **Distributed**: Multi-node coordination with Lamport clocks

## Documentation

See https://github.com/TollMesh/toll-mesh-store for complete documentation.

## License

Apache License 2.0
