Skip to main content

Proxyables (Python)

A high-performance, peer-to-peer RPC library that makes remote objects feel local. Built on top of Yamux multiplexing and Python's __getattr__ magic, it enables seamless bi-directional interaction between processes with support for callbacks, distributed garbage collection, and transparent async proxying.

Features

  • Peer-to-Peer Architecture: No strict client/server distinction — both sides can import and export objects, enabling true bi-directional communication.
  • "Local-Feeling" API: Intercepts property access, method calls, and item access using __getattr__ and __getitem__, making remote objects behave like local ones.
  • Distributed Garbage Collection: Automatically manages remote object lifecycles using weakref and a reference counting protocol.
  • Bi-Directional Callbacks: Pass functions and objects as arguments — they are automatically registered and hydrated as proxies on the other side.
  • Instruction Batching: Chains of property accesses and method calls are accumulated and sent as a single EXECUTE instruction for efficiency.
  • Stream Multiplexing: Uses Yamux to multiplex concurrent operations over a single connection.

Installation

pip install stateforward.proxyables

Usage

Basic Example

Server (Exporting an object):

from proxyables import Proxyable

class API:
    def echo(self, msg: str) -> str:
        return f"echo {msg}"

    def compute(self, a: int, b: int) -> int:
        return a + b

# stream is any asyncio duplex stream
exported = await Proxyable.Export(API(), stream)

Client (Importing the object):

from proxyables import Proxyable

proxy = await Proxyable.ImportFrom(stream)

# Usage - feels completely local!
result = await proxy.echo("hello")    # "echo hello"
result = await proxy.compute(10, 20)  # 30

Architecture

  1. Proxy Layer: ProxyCursor wraps remote objects, accumulating instructions on property access and method calls.
  2. Instruction Protocol: Operations (get, apply, etc.) are serialized into ProxyInstruction messages using MessagePack.
  3. Transport: Uses Yamux to multiplex concurrent operations over a single connection (TCP, Unix socket, stdio, etc.).
  4. Reference Management: An ObjectRegistry tracks local objects passed by reference with automatic cleanup via weakref.

License

MIT

Metadata

Release files for stateforward.proxyables 0.1.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 stateforward.proxyables 0.1.0
File Size Uploaded Provenance Actions
stateforward_proxyables-0.1.0.tar.gz 15.3 kB Without provenance Details for stateforward_proxyables-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stateforward.proxyables 0.1.0
File Interpreter ABI Platform Actions
stateforward_proxyables-0.1.0-py3-none-any.whl Python 3 none any Details for stateforward_proxyables-0.1.0-py3-none-any.whl

Total release size: 33.7 kB

Release files / stateforward_proxyables-0.1.0.tar.gz

Download URL stateforward_proxyables-0.1.0.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4bb61c520826acd1bf5fde67287bc3372b810863ad4e64e991b36a94ba23daaa
BLAKE2b-256 checksum
How to use checksums
0c5c7e93f30920b140d477fdf2551ab73c960cfcba7d3ca727ff3f2e8036f41a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / stateforward_proxyables-0.1.0-py3-none-any.whl

Download URL stateforward_proxyables-0.1.0-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b24f79c262779097f5e5da2e2a092749998c1f4157ad7974130fa8812e4eb683
BLAKE2b-256 checksum
How to use checksums
497c867335790ac88fbaef4b450dc450b48c6749708a25861fc1c07c812a7de7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.18 {"installer":{"name":"uv","version":"0.9.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for stateforward.proxyables 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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