DocumentationCore Protocol

🐍 Python SDK (Beta)

Bringing PaindaProtocol's zero-copy binary performance to the Python ecosystem. Ideal for AI integration, data science streaming, and high-performance backend services.

🚧 Current Status: Beta

The core binary framing and async transport are implemented. We are currently finalizing the Delta Engine (state synchronization) parity.

Key Features

  • Native Binary Framing: Efficient Header V2 encoding using struct.
  • Async First: Built on top of asyncio and websockets.
  • Zero-Copy Parity: Minimize memory allocations during frame processing.
  • Delta Engine Support: Compatible with JS-based StateManager for real-time sync.

Quick Start (Preview)

import asyncio
from painda import PPClient

async def main():
    client = PPClient("ws://localhost:3000")
    
    @client.on("connect")
    def on_connect():
        print("Connected to Painda server!")

    @client.on("game:update")
    def on_update(data):
        print("Received update:", data)

    await client.connect()

asyncio.run(main())

Why Python?

In 2026, real-time data is dominated by AI and Machine Learning. By providing a native Python client, we enable seamless, low-latency communication between performance-critical JS servers and Python-based AI agents.