Skip to main content

Python - AnyCall (core library)

This directory contains the AnyCall core library for Python (published as anycall-py). Call functions across Python services using Redis, with no .proto files, exposed ports, or extra service plumbing to maintain.

../example-consumer/ and ../example-supplier/.

Structure

  • src/anycall/ - AnyCall core library package
  • pyproject.toml - Package metadata and dependencies
  • TESTING.md - How to run the test suite

How to use

Install

# Using uv (recommended)
uv sync

# Or using pip
pip install -e .

Quick usage

  • Supplier: decorate methods with @supply, register the class, and start the server.
  • Consumer: create an AnyCall client and call the supplier method by name.
server = AnyCall.server(redis_uri)
server.register(SentimentAnalyzer())
server.start()

client = AnyCall.client(redis_uri)
sentiment = client.call("analyze-sentiment", request, Sentiment)

For details on how to use as a supplier or consumer, see USAGE.md.

Modules

lib

Core library implementing an RPC framework via Redis Streams. Uses the AnyCall factory class to create clients and servers:

  • AnyCall Client: Synchronous interface for invoking remote methods. Serializes the request to JSON, publishes to a Redis Stream, waits for the response on a callback stream. Supports configurable timeout and optional metrics collection.

  • AnyCall Server: Listener that processes requests from Redis. Maintains a thread pool (one per registered method) consuming from specific streams. Methods are discovered via the @supply decorator on registered classes.

  • Configuration: Via AnycallProperties — defines parameters like Redis URI, timeouts, thread pools, etc.

example-consumer

Client application demonstrating the use of AnyCallClient. Makes 100 RPC calls to the analyze-sentiment method and displays latency statistics (min, avg, p50, p95, p99, max). Includes warmup call and metrics support.

example-supplier

Server application that registers suppliers via AnyCall.server(). The SentimentAnalyzer class contains an analyze_sentiment method decorated with @supply("analyze-sentiment"), which handles sentiment analysis. Starts listeners for each registered method.

Metadata

Release files for anycall-py 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for anycall-py 0.6.0
File Size Uploaded Provenance Actions
anycall_py-0.6.0.tar.gz 21.7 kB Without provenance Details for anycall_py-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for anycall-py 0.6.0
File Interpreter ABI Platform Actions
anycall_py-0.6.0-py3-none-any.whl Python 3 none any Details for anycall_py-0.6.0-py3-none-any.whl

Total release size: 48.1 kB

Release files / anycall_py-0.6.0.tar.gz

Download URL anycall_py-0.6.0.tar.gz
Size 21.7 kB
Tags Source
SHA-256 checksum
How to use checksums
55c5549bf254c2cdd7ac225ba63059b5bebdb5942f5961326e3ac712c8d3a2bf
BLAKE2b-256 checksum
How to use checksums
99d4335f6cf263d202b7483d6affffbb726736a9430fb3209a6e7d3c5ae10223
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Release files / anycall_py-0.6.0-py3-none-any.whl

Download URL anycall_py-0.6.0-py3-none-any.whl
Size 26.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2509473d83bc6df45be459125de2b2d6541db972efc64e8b48e196b9b88b91ee
BLAKE2b-256 checksum
How to use checksums
8020fe90cf75a491fb68593761a91ba8ab70cb241a67082e7032acc9b09fdbe4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Security for anycall-py 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page