On this page

Conduit cloud๏ƒ

๐ŸŸก Intermediate ยท Lesson 24

The ConduitCloud - the world's phone book for dynamic NAMED roots. Reached publicly from any conduit; look peers up by name instead of passing references around.

Before you run๏ƒ

Use the Intermediate guide for prerequisite concepts. Run from a checkout with Melder installed and Python 3.14 free-threading selected. The collection download includes the level's local helper modules.

Run the saved script๏ƒ

python UX_and_AIX_experiences/02_intermediate/24_conduit_cloud.py
py -3.14t UX_and_AIX_experiences/02_intermediate/24_conduit_cloud.py

Download this collection ยท Source on GitHub

Public surface๏ƒ

Conduit.get_conduit_cloud, has_conduit_name, get_conduit

Code๏ƒ

 1"""
 2TIER: intermediate (24)
 3GOAL: The ConduitCloud - the world's phone book for dynamic NAMED
 4      roots. Reached publicly from any conduit; look peers up by name
 5      instead of passing references around.
 6SURFACE EXERCISED: Conduit.get_conduit_cloud, has_conduit_name, get_conduit
 7"""
 8import sys
 9from pathlib import Path
10
11sys.path.insert(0, str(Path(__file__).parent))  # local helper (see _dynamic_world)
12from _dynamic_world import dynamic_spellbook
13
14import melder as md
15
16
17class Anchor:
18    pass
19
20
21def main() -> None:
22    alpha_book = dynamic_spellbook()
23    alpha_book.bind(spell=Anchor, existence="unique")
24    alpha = alpha_book.conjure(dynamic=True, name="alpha")
25    beta = dynamic_spellbook().conjure(dynamic=True, name="beta")
26
27    cloud = alpha.get_conduit_cloud()
28    assert cloud.has_conduit_name("alpha") and cloud.has_conduit_name("beta")
29    found = cloud.get_conduit("beta")
30    assert found is beta
31    print("phone book works: looked beta up by name, got the live conduit")
32
33
34if __name__ == "__main__":
35    main()

Check the outcome๏ƒ

The script contains its own assertions or demonstrated refusal paths. Run it to evaluate those checks against your installed version. The code above is taken directly from the saved file; no run output is invented here.

More intermediate examples ยท Level guide

API contracts๏ƒ