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.7.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.7.0
File Size Uploaded Provenance Actions
anycall_py-0.7.0.tar.gz 25.3 kB Without provenance Details for anycall_py-0.7.0.tar.gz

Built distribution (wheel)

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

Total release size: 56.6 kB

Release files / anycall_py-0.7.0.tar.gz

Download URL anycall_py-0.7.0.tar.gz
Size 25.3 kB
Tags Source
SHA-256 checksum
How to use checksums
28e08680fa3c4d8bb999ab6cdaec6af02b72fdb480df4d891bcf8c269e3b0754
BLAKE2b-256 checksum
How to use checksums
2b49102a7d0a8afb67156c46df572ee910d66f0ec685a2212cd1a7c5c165773f
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.7.0-py3-none-any.whl

Download URL anycall_py-0.7.0-py3-none-any.whl
Size 31.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7215bcc6bb7a4f88a9955907916e60d140d23055736225f8e4402f7b23ac5916
BLAKE2b-256 checksum
How to use checksums
930672017a91af538fc7bb4f0c8eea889c562e74924869e96c69b824f4c12ecb
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.7.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