On this page
Hello Melder๏
๐ข Beginner ยท Lesson 01
The sixty-second first contact - bind one class, conjure a conduit, meld an instance. The whole DGR in four lines.
Before you run๏
Use the Beginner 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/01_beginner/01_hello_meld.py
py -3.14t UX_and_AIX_experiences/01_beginner/01_hello_meld.py
Public surface๏
md.Spellbook, md.Existence, md.Conduit (returned type)
Code๏
1"""
2TIER: beginner (01)
3GOAL: The sixty-second first contact - bind one class, conjure a conduit,
4 meld an instance. The whole DGR in four lines.
5SURFACE EXERCISED: md.Spellbook, md.Existence, md.Conduit (returned type)
6VERIFY: rides the owner's 3.14t run; asserts are the contract.
7"""
8import melder as md
9
10
11class Greeter:
12 """A plain user class - melder needs no base class, no metaclass."""
13
14 def greet(self) -> str:
15 return "hello from a melded instance"
16
17
18def main() -> None:
19 book = md.Spellbook()
20 book.bind(spell=Greeter, existence="unique")
21 conduit = book.conjure()
22
23 greeter = conduit.meld(spell=Greeter)
24 assert isinstance(greeter, Greeter)
25 assert isinstance(conduit, md.Conduit)
26 print(greeter.greet())
27
28 # unique existence means the SAME instance comes back every meld
29 again = conduit.meld(spell=Greeter)
30 assert again is greeter
31 print("unique lifecycle held:", again is greeter)
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.