Metadata-Version: 2.4
Name: anycall-py
Version: 0.1.0
Summary: Polyglot RPC over Redis — call functions across languages
Project-URL: Homepage, https://github.com/KaiqueBahmad/anycall
Project-URL: Repository, https://github.com/KaiqueBahmad/anycall
Author-email: Kaique Bahmad <kaiquebahmadt@gmail.com>
License: MIT
Keywords: cross-language,microservices,polyglot,redis,rpc,streams
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
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 :: Communications
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Requires-Dist: dacite>=1.8.0
Requires-Dist: redis>=5.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == 'dev'
Description-Content-Type: text/markdown

# AnyCall Library

Redis-based library for RPC in Python. Provides a framework for communication between applications through Redis Streams.

## Overview

AnyCall is a framework that allows Python applications to communicate asynchronously through Redis, using Redis Streams as the message transport mechanism.

## Main Components

### Core
- **AnyCall** - Main library interface
- **AnyCallClient** - Client for calling methods on remote suppliers
- **AnyCallServer** - Server for registering and executing methods
- **RedisStreamAdapter** - Redis Streams adapter

### Configuration
- **AnycallProperties** - Configuration properties for the library
- **supply** - Decorator to mark methods as supply

### Models
- **AnyCallRequest** - RPC request model
- **AnyCallResponse** - RPC response model

## Build

```bash
uv sync
```

This will install the library and its dependencies in the workspace.

## Basic Usage

1. Implement a supplier using the `@supply` decorator
2. Configure and start the `AnyCallServer`
3. Use `AnyCallClient` to call methods remotely

See `example-supplier` and `example-consumer` for practical examples.

## Dependencies

- Redis
- Python 3.9+

## Configuration

Configure properties through `AnycallProperties`:

```python
from datetime import timedelta
from anycall import AnyCall

props = AnycallProperties(
    timeout=timedelta(seconds=30),
    metrics_enabled=True
)
```

Or use the defaults:

```python
from anycall import AnyCall

client = AnyCall.client("redis://localhost:6379")
```
