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
AnyCallclient 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: Interface for invoking remote methods, blocking or not (
client.aio). Serializes the request to JSON and publishes it to a Redis queue; every response comes back on the client's own queue, where a single reader hands it to the call waiting for it. Takes defaultCallOptions(timeout, queue-depth limit) inAnyCall.client(...), which a call's ownCallOptionsreplace; closing it stops everything at once. -
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
@supplydecorator on registered classes. Each method's concurrency is optionally capped by@supply(max_concurrency=...)(default1), with an optional server-wide cap viaAnyCall.server(redis_uri, ServerOptions(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.11.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| anycall_py-0.11.0.tar.gz | 43.5 kB | Without provenance | Details for anycall_py-0.11.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| anycall_py-0.11.0-py3-none-any.whl | Python 3 | none | any | Details for anycall_py-0.11.0-py3-none-any.whl |
Total release size: 95.7 kB
Release files / anycall_py-0.11.0.tar.gz
| Download URL | anycall_py-0.11.0.tar.gz |
|---|---|
| Size | 43.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2d6b8a210dcf68c4d482de9b0e2542f7e9696c40fc7363dcabacb01b886df36
|
|
BLAKE2b-256 checksum How to use checksums |
b338074b84a822687338546205993e44c771fbe72a24cddac96f5df534a247a8
|
| 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.11.0-py3-none-any.whl
| Download URL | anycall_py-0.11.0-py3-none-any.whl |
|---|---|
| Size | 52.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
452761483c766f940da93e9c015418b80f3cd88207de2a49ae5dd309dad8c5e9
|
|
BLAKE2b-256 checksum How to use checksums |
46fe1d180facbce49833bfe00d364755a4e7ff62a70bb893967407367b52e2a8
|
| 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.11.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.