Skip to main content

A short description of my awesome library.

Project description

Club3: The Ivy & Ho Anniversary Protocol 🥂

A serverless, decentralized, conflict-free shared space.

"Two nodes, one network, zero servers."

Club3 is a Python library created to celebrate the 3rd Anniversary of Ivy & Ho. It creates a shared, synchronized dictionary across a local network. It allows devices to discover each other instantly and stay in perfect sync without a central server—just like a strong partnership.


💖 The Philosophy

Under the hood, this project is built on a CRDT (Conflict-free Replicated Data Type) using a "Last-Write-Wins" register.

  • Resilience: If we disagree (concurrent updates), the system converges to a single truth without crashing.
  • Forgiveness: It accepts the newest update, understanding that the state of things changes over time.
  • Connection: It uses UDP Multicast, meaning it doesn't need a "manager" or a "server." It just needs the two of us on the same network.

🚀 Features

  • Serverless Sync: Uses UDP Multicast (224.1.1.1) to find peers automatically.
  • Real-Time: Changes on one laptop appear on the other instantly.
  • Modern Async API: Supports async for loops to trigger UI updates cleanly.
  • Smart Discovery: Includes "Thundering Herd" suppression—when a new device joins, only one peer volunteers to sync data, keeping the network quiet.
  • Thread-Safe: Built with threading.Lock to handle background network traffic while you interact with the data.

📦 Installation

No external dependencies required. Just standard Python 3.

pip install ivy-ho-club3

💻 Usage

1. The Simple "Hello"

Open Python on Computer A:

from ivy_ho import Club3

# Connect to the space
space = Club3()

# Write a note
space['anniversary'] = "Happy 3rd Year!"
space['dinner_plans'] = "Sushi at 7pm"

Open Python on Computer B:

from ivy_ho import Club3

space = Club3()

# It syncs automatically!
print(space['anniversary']) 
# Output: "Happy 3rd Year!"

2. The Reactive Dashboard (Async)

Use this to build a UI or a script that reacts whenever the other person types.

import asyncio
from ivy_ho import Club3

async def main():
    club = Club3()
    print(f"❤️ Connected as Node: {club._node_id}")

    # This loop pauses until Ivy or Ho changes something
    async for key, value in club.watch():
        print(f"✨ New Update: [{key}] is now -> {value}")

if __name__ == "__main__":
    try:
        asyncio.run(main())
    except KeyboardInterrupt:
        print("Disconnected.")

⚙️ Under the Hood

For the curious engineers:

UDP Multicast: We bind to 0.0.0.0 and join group 224.224.224.1. This broadcasts packets to everyone on the LAN.

Packet Structure: We use pickle to serialize data, sending up to 65,535 bytes (the max UDP packet size).

Thundering Herd Suppression: When a new node sends OP_SYNC_REQ, existing nodes wait a random 0.1-0.5s. The first to wake up broadcasts an OP_SYNC_CLAIM, silencing the others. This ensures we don't flood the network with duplicate data.


🥂 Dedication

To Ivy & Ho,

Here is to 3 years of:

Fixing bugs/issues together.

Merging our lives without conflicts.

Staying synchronized, no matter the latency.

Happy Anniversary!


v3.0.2 - Built with Python & Love.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ivy_ho_club3-3.0.2.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ivy_ho_club3-3.0.2-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file ivy_ho_club3-3.0.2.tar.gz.

File metadata

  • Download URL: ivy_ho_club3-3.0.2.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for ivy_ho_club3-3.0.2.tar.gz
Algorithm Hash digest
SHA256 12ec7067725b71829d795d646eca2c311d8cce6b5017bda8cb2f1afced1864c8
MD5 99e2ce0d129f4798e281f886d64cdd60
BLAKE2b-256 521eb969ba9466f0b4eaa5202cb14f740e5e4a74042b1f793f6921646e5a94ed

See more details on using hashes here.

File details

Details for the file ivy_ho_club3-3.0.2-py3-none-any.whl.

File metadata

  • Download URL: ivy_ho_club3-3.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for ivy_ho_club3-3.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 77ae61948e3614abf65b8bccedebb3fe391d8b56417b9e6c74c93c648cf9df5d
MD5 a948c2e6aec37d1a18752ec3ce214d5b
BLAKE2b-256 8b06d0e6fd9f03563f832aba58040154fc2ffcd284015b90cf47a555173b0442

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page