Skip to main content

EasySync

Universal real-time state synchronization for Python.

Python License

Manipulate your Python objects as if the network didn't exist. EasySync intercepts attribute mutations through a transparent proxy and propagates them instantly to all machines connected to the server.

Installation

pip install py-easysync

Quick Start

Server (hosts the shared state):

from easysync import SyncedObject, SyncServer, connect

server = SyncServer(port=5000)
server.start_thread()

client = connect("127.0.0.1", 5000)

@SyncedObject(client)
class GameState:
    def __init__(self):
        self.score = 0
        self.players = []

state = GameState()
state.score = 42           # propagated to all clients
state.players.append("A")  # propagated too

Client (joins the server):

from easysync import SyncedObject, connect

client = connect("192.168.1.10", 5000)

@SyncedObject(client)
class GameState:
    def __init__(self):
        self.score = 0
        self.players = []

state = GameState()
print(state.score)    # 42, updated in real time
print(state.players)  # ['A']

Architecture

The server uses asyncio for non-blocking connection handling, allowing it to support a large number of simultaneous clients without CPU overhead. The client uses a dedicated receive thread to remain compatible with standard application loops (Pygame, Matplotlib, etc.).

The wire protocol relies on binary Pickle serialization framed by a 4-byte header (payload size). This ensures measured latency under 20ms.

Features

  • Zero configuration: a single @SyncedObject decorator is all you need.
  • Transparent proxy: automatic interception of __setattr__, __setitem__, append, etc.
  • Hybrid Transport (TCP/UDP): Use UDP for low-latency streaming and TCP for critical state.
  • Delta Sync: Efficient differential encoding for heavy objects (NumPy, Torch) using XOR + Compression.
  • Live Telemetry: Integrated tracking of latency (ms), bandwidth (KB/s), and packet counts.
  • Secure Auth: Protect your SyncServer with custom authentication handlers.
  • High Scalability: Asyncio-based server handling hundreds of concurrent clients.

Examples

The examples/ folder contains several demos:

File Description
remote_host.py / viewer.py NEW: Remote Desktop with UDP & Delta Sync
pygame_example.py Synchronized square between two Pygame windows
pygame_hanoi.py Collaborative Tower of Hanoi
numpy_matplotlib_example.py NumPy data streaming with Matplotlib
pandas_example.py Collaborative Pandas spreadsheet
federated_learning_example.py Distributed federated learning
genetic_island_example.py Distributed genetic algorithm
tetris_ai_example.py Distributed Tetris AI via genetic algorithm

To run the examples, install the additional dependencies:

pip install -r requirements_examples.txt

Then launch a server and one or more clients:

python examples/pygame_example.py server    # Terminal 1
python examples/pygame_example.py           # Terminal 2

License

MIT

Metadata

Release files for py-easysync 0.1.1

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

Source distribution (sdist)

Source distribution for py-easysync 0.1.1
File Size Uploaded
py_easysync-0.1.1.tar.gz 21.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for py-easysync 0.1.1
File Interpreter ABI Platform
py_easysync-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 36.7 kB

Release files / py_easysync-0.1.1.tar.gz

Download URL py_easysync-0.1.1.tar.gz
Size 21.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7420da6f1d74a0ae6b72b9012d9d6fb6a91656622b80c633a2aa42d9fd2a5a3f
BLAKE2b-256 checksum
How to use checksums
2998b16ee3049ba3dfcdf859316ab28f30b08bfd94bef4a8f1f9133d944bb984
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 8, 2026.

Transparency log

Release files / py_easysync-0.1.1-py3-none-any.whl

Download URL py_easysync-0.1.1-py3-none-any.whl
Size 15.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b628477b43f87ba8e8d6bbfc9dc60552f33966db4e3f8941d11141217c88634
BLAKE2b-256 checksum
How to use checksums
9ff6ba7b7a5864ff325d72d3db8f567449ae46773a8486e0c7f4eef78a767b13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

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