On this page
Bind โ conjure โ meld๏
Beginner. Three verbs, one order.
Excerpt. Config and Server are your application classes. Start with a
fresh book, register both, and conjure once; the final line returns a Server.
book = md.Spellbook()
# 1. bind everything
book.bind(spell=Config, existence="unique")
book.bind(spell=Server, existence="many")
# 2. conjure ONCE โ compiles + validates the entire graph
conduit = book.conjure()
# 3. meld everywhere
server = conduit.meld("Server")
conjure() prepares the registered graph. Requirements extraction, graph
construction, cycle detection, and runtime compilation run there. Cycles and
ambiguous providers refuse startup. A typed parameter with no provider can be
supplied at meld(override={...}); omitting it when construction needs it raises
UnresolvedInputError. Ordinary Python parameter defaults remain defaults.
One book, one conjure. A Spellbook produces exactly one conduit, ever. More scopes?
create_lesser_conduit(). Another root? Another book.
Runnable examples๏
The basic rhythm โ Beginner 21
One book one conduit โ Beginner 36