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 (Lists as queues). 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 queue, waits for the response on a callback queue. Supports a configurable timeout and a default queue-depth limit, both passed to AnyCall.client(...).

  • AnyCall Server: Listener that processes requests from Redis. Each registered method gets its own read loop, and taken requests run on a shared worker pool. Methods are discovered via the @supply decorator on registered classes. Each method's concurrency is optionally capped by @supply(max_concurrency=...) (default 1), with an optional server-wide cap via AnyCall.server(redis_uri, max_concurrency=...).

example-consumer

Client application demonstrating the use of AnyCallClient. Makes one call to the analyze-sentiment method and logs the response.

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.8.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.8.0
File Size Uploaded Provenance Actions
anycall_py-0.8.0.tar.gz 29.0 kB Without provenance Details for anycall_py-0.8.0.tar.gz

Built distribution (wheel)

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

Total release size: 64.2 kB

Release files / anycall_py-0.8.0.tar.gz

Download URL anycall_py-0.8.0.tar.gz
Size 29.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b132ecb1c162c525b9f3d268331f76ff9a7cf2a5962cc7b7bd5bf1e030ae076b
BLAKE2b-256 checksum
How to use checksums
c6521f375009c5e4dc3b3a0ba48aa27ac046a4f0d0049a6a1ef408726d4bffa7
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.8.0-py3-none-any.whl

Download URL anycall_py-0.8.0-py3-none-any.whl
Size 35.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e909b93ad3596d7a79ef03357c7cbafeb1f1eaca37781ef7f633a2191053576b
BLAKE2b-256 checksum
How to use checksums
b5e0a0f397e6ab5af2f909662f10c944773b43df460ff52994e81f14d8a85198
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.8.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