# Constructor di by annotation **🟡 Intermediate · Lesson 15** THE DI heart - annotate a constructor parameter with a bound class and melder injects it. Dependencies resolve recursively; you meld the top and the graph assembles itself. ## Before you run Use the [Intermediate guide](../../intermediate/index.md) 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 ```bash python UX_and_AIX_experiences/02_intermediate/15_constructor_di_by_annotation.py ``` ```powershell py -3.14t UX_and_AIX_experiences/02_intermediate/15_constructor_di_by_annotation.py ``` {download}`Download this collection <../../downloads/intermediate-examples.zip>` · [Source on GitHub](https://github.com/Synaptic724/melder/blob/a30a754d0bb61db0b142936010cdb82cffecec6f/UX_and_AIX_experiences/02_intermediate/15_constructor_di_by_annotation.py) ## Public surface type-hint constructor DI (SINGLE_BY_ANNOTATION) ## Code ```{literalinclude} ../../downloads/02_intermediate/15_constructor_di_by_annotation.py :language: python :linenos: ``` ## 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](index.md) · [Level guide](../../intermediate/index.md) ## Related guides - [Constructor dependency injection](../../beginner/dependency-injection.md) - [Constructor, explicit, and collection DI](../../intermediate/dependency-injection.md)