.. meta::
   :description: diwire named components example: multiple registrations using Annotated[T, Component(\"name\")].

Named components
================

What you'll learn
-----------------

- Register multiple implementations for the same base type using ``Component(\"...\")``.

Run locally
-----------

.. code-block:: bash

   uv run python examples/ex_07_named_components/01_named_components.py

Example
-------

.. literalinclude:: ../../../examples/ex_07_named_components/01_named_components.py
   :language: python
   :class: diwire-example py-run

