Margrete RPC
Advanced

Connect Multiple Margrete

With no arguments, Margrete() auto-detects the running plugin instance. This is the normal form when one Margrete window is open. If you have multiple running instances, pass endpoint or instance_id:

from margrete_rpc import Margrete, list_instances

# list all discovered instances
for inst in list_instances():
    print(inst.instance_id, inst.endpoint)
    for transport in inst.transports:
        print(" ", transport.type, transport.endpoint)

# connect by explicit TCP endpoint (left Margrete)
with Margrete(endpoint="127.0.0.1:1328") as m_left:
    print(m_left.status())

# connect by the instance_id (right Margrete)
with Margrete(instance_id="47824-6a30f65d-b7f8afde84506008") as m_right:
    print(m_right.status())

Two Margrete instances with different endpoints

endpoints support these formats:

FormatTransport
127.0.0.1:1328TCP
tcp://127.0.0.1:1328TCP
npipe://./pipe/margrete-rpc-...Windows named pipe