OVERVIEW

PYTHON · NETWORK TCP · UDP · SHM

EasySync

Real-time state synchronization for Python.

Manipulate your Python objects as if the network didn't exist. A transparent proxy intercepts every mutation and propagates it instantly to all connected machines.

$ pip install py-easysync
SYNC_CLUSTER LIVE
CLIENT_A score 0 · players 0 CLIENT_B score 0 · players 0 CLIENT_C · UDP score 0 · players 0 SyncServer score = 0 players = [] relayed = 0
Pick a client, then mutate its state.
100µs
Median latency (TCP)
100k/s
Updates delivered
5ms
Broadcast to 100 clients
~1GB/s
Binary payloads

FEATURES

One decorator, zero sockets to manage. Everything else is handled for you.

Transparent proxy

auto_fix_high

Attribute assignments, item writes and in-place mutations (append, update…) are intercepted and propagated automatically.

@SyncedObject SyncedVar

Hybrid TCP/UDP

swap_calls

TCP for critical state, UDP for streams where a lost value is replaced by the next one. Pick the transport for each synced class.

transport="udp" asyncio

Delta Sync

difference

XOR + zlib differentials for heavy objects: only what changed goes on the wire: 98% fewer bytes on a 720p frame.

numpy torch codecs

Zero-socket IPC

memory

Between processes on the same machine, the SHM mode syncs through shared memory with EasySHM. No server, no port.

shm_connect() easyshm

Live telemetry

monitoring

Latency, bandwidth and packet counts tracked in real time, with a built-in ping/pong for precise health checks.

client.stats ping()

Secure auth

lock

Protect a SyncServer with your own authentication handler: rejected clients never reach the shared state.

@server.on_auth auth_payload

PERFORMANCE

Measured, not promised: separate processes, a real SyncServer and thousands of updates through @SyncedObject.

Measure Result
Update latency, one-way, TCP (median / p99) 100 µs / 290 µs
Same, UDP transport 290 µs / 1.1 ms
Same, SHM mode (shm_connect) 230 µs / 680 µs
Sustained updates, one sender → one receiver ~100,000 / s, 100 % delivered
Broadcast until every client has it: 10 / 50 / 100 clients (median) 1.1 / 3.0 / 5.2 ms
Binary payload, 1 MB / 10 MB 1.0 ms / 9.5 ms
Delta Sync, 720p frame with a 100×100 px change 2.76 MB → 45 KB (−98 %)

Version 0.2.0, Linux (WSL2), Python 3.12, 12 CPU, localhost. Latency is half of a ping/pong round trip between two processes; the delta figure is the size of the update actually sent. Run python benchmarks/perf.py to measure your machine.