# 🟢 Beginner examples **41 saved lessons.** Follow their order or choose a topic that answers your question. [Open the Beginner guide](../../beginner/index.md) · [All examples](../index.md)
The sixty-second first contact - bind one class, conjure a conduit, meld an instance. The whole DGR in four lines.
The one decision every binding makes - where does instance reuse stop? unique = one shared instance; many = fresh construction per meld. This is Existence, the heart of the bind vocabulary.
Spells are not only classes - functions and ready-made objects bind with the same verb. RUNTIME LAW (proven by the harness): callable and pre-built spells are always "unique" - the factory…
Two implementations of one shape, told apart by binding_name - the beginner door into disambiguation (spellframes come later).
Scopes without ceremony - a lesser conduit is a child resolution scope; unique_per_conduit gives each scope its own instance while plain unique stays shared across the family.
Failing well on day one - every exception melder raises at you is catchable from the root namespace. No internal paths, ever.
The vocabulary enums all accept their string names too - config files and CLI flags can drive registration without importing the enums. Both spellings resolve to the same lifecycles.
Teardown is part of registration - disposal_method_names tells melder which methods to call on YOUR instances when their owner cleans up. No base class, no protocol: name the method, done.…
Spellframes are the grouping key above binding names - one frame key collects a family of related bindings, and (spellframe, binding_name) is the full lookup address.
Teardown is a verb you own - conduit.cleanup() then book.cleanup(), in that order, and a cleaned book refuses further work loudly. (Disposal hooks you registered fire during this walk - see…
Registration is just Python - bind a whole list of classes with a plain loop. No special batch API needed, ever.
An agent's first sixty seconds with melder: read the workflow map from help(), read the version, then open the hardcopy system docs the package carries about itself. No filesystem, no web -…
unique, studied closely - ONE instance for the whole world: root conduit, child scopes, everywhere. The widest sharing mode.
many, studied closely - construction EVERY meld, no caching anywhere. The mode for request-shaped, disposable things.
unique_per_conduit - each conduit scope holds its OWN single instance; stable inside the scope, separate across scopes.
Type hints and melding are friends - annotate what you meld and your editor (and your agent) knows every attribute from there on. melder ships py.typed, so checkers see real types, not Any.
Protocols describe a SHAPE; bindings fill it - two implementations of one Protocol, chosen by binding name, called through the shared shape. Static duck typing meets dependency injection,…
The composition root - ONE function that binds the whole world and hands back the conduit. Configured things are BUILT there and bound as instances; everything else in the app just melds.…
The whole beginner lifecycle vocabulary on one page. Three modes answer one question - where does instance reuse stop? - and three is enough to build real things. (Three more exist for…
Your constructor defaults ARE the configuration - a class with default arguments melds without any extra setup. melder calls YOUR __init__; Python fills the defaults.
The rhythm of every melder program: bind everything FIRST, conjure ONCE, meld everywhere after. Three verbs, one order.
binding_name is a SUB-key - the same name under two different frames is two different addresses. (frame, name) is always the full address; names never collide across frames.
The three mistakes everyone makes in hour one, and what melder says back. Learn the error shapes once and debugging is easy.
One class, one spell - a spell_id is the SHA256 of the class's code, so the SAME class registers once, whatever binding name or lifecycle you give it (beginner 30). The working pattern for…
Spellframes are CATEGORIES. Organize one world's spells by the resolution ideas your app already has - "repositories", "notifiers" - and (category, name) becomes the full address. The…
THE ADDRESS LAW (run-proven + doc-canon): every spell lives at one (frame_key, binding_key) address - frame_key is your spellframe, or the spell's normalized name if you gave none;…
App structure 101 - main() owns the conduit and PASSES it to the functions that need things. Don't re-conjure, don't stash globals: the conduit is the world handle, hand it around like one.
Melded objects are YOUR objects - no proxies, no wrappers, no magic subclasses. What comes back IS the instance: identity checks hold, isinstance holds, and it works everywhere a plain…
"many" means ISOLATED - each melded instance owns its own state; mutating one never leaks into the next. The confusion this example prevents: expecting fresh objects to share anything.
Binding the SAME class twice is refused - a spell_id is the SHA256 of the class's code, and one object registers once, under any binding name or lifecycle. When one shape must serve two…
existence is not optional - the bind vocabulary is explicit by design. Forgetting it fails LOUDLY at bind time, not quietly at meld time. The error type is printed for the record.
Two factory shapes, one law each - a FUNCTION spell is unique (one shared product); when you want a fresh object per meld, the factory must be a CLASS bound "many".
A registry of ready-made same-typed objects. Spell names must be unique per book (probe-proven), so N instances of one class bind as ONE registry spell - the dict is the spell, lookup stays…
unique vs unique_per_conduit in the SAME conduit tree - the side-by-side that makes scope reach click.
disposal_method_names takes a LIST - complex resources name every teardown verb they need, and the printed order documents how the runtime walks them.
One book conjures ONE conduit, ever (probe-proven: a second conjure raises RuntimeError). Multiple scopes come from lesser conduits; multiple roots come from multiple books.
The whole bind vocabulary on one page - every kwarg a beginner will meet, printed as a cheatsheet next to a registration that uses ALL of them at once.
Closing the dict-style loop - a small helper melds a whole frame family into a plain {name: instance} dict, because the (frame, name) address space maps 1:1 onto the dicts users already…
An agent classifying the library itself - walk md.__all__ and sort every name into callable vocabulary vs types vs errors vs metadata, producing the machine-readable inventory an agent…
Build and use a small application across separate Python modules: ordinary objects, one bootstrap, a TYPE_CHECKING consumer, constructor injection, shared resources, fresh handlers, and…
YOU own the memory now - not the GC. A DI runtime HOLDS what it builds: your `unique` instance lives in the conduit's creations store, so dropping YOUR variable frees nothing - Python's…