@@ -10,7 +10,7 @@ Aggregate provider
10
10
This page demonstrates how to implement the polymorphism and increase the
11
11
flexibility of your application using the Aggregate provider.
12
12
13
- :py:class: `Aggregate ` provider aggregates other providers.
13
+ :py:class: `Aggregate ` provider aggregates a group of other providers.
14
14
15
15
.. currentmodule :: dependency_injector.providers
16
16
@@ -20,7 +20,7 @@ Aggregate provider
20
20
:emphasize-lines: 24-27
21
21
22
22
Each provider in the ``Aggregate `` is associated with a key. You can call aggregated providers by providing
23
- their key as a first argument. All positional and keyword arguments after the key will be forwarded to
23
+ their key as a first argument. All positional and keyword arguments following the key will be forwarded to
24
24
the called provider:
25
25
26
26
.. code-block :: python
@@ -33,7 +33,7 @@ You can also retrieve an aggregated provider by providing its key as an attribut
33
33
34
34
yaml_reader = container.config_readers.yaml(" ./config.yml" , foo = ... )
35
35
36
- To retrieve a dictionary of aggregated providers with their associated keys , use ``.providers `` attribute:
36
+ To retrieve a dictionary of aggregated providers, use ``.providers `` attribute:
37
37
38
38
.. code-block :: python
39
39
@@ -46,7 +46,7 @@ To retrieve a dictionary of aggregated providers with their associated keys, use
46
46
You can not override the ``Aggregate `` provider.
47
47
48
48
.. note ::
49
- When you inject the ``Aggregate `` provider it is passed "as is".
49
+ When you inject the ``Aggregate `` provider, it is passed "as is".
50
50
51
51
To use non-string keys or string keys with ``. `` and ``- ``, provide a dictionary as a positional argument:
52
52
@@ -59,13 +59,14 @@ To use non-string keys or string keys with ``.`` and ``-``, provide a dictionary
59
59
})
60
60
61
61
.. seealso ::
62
- :ref: `selector-provider ` to inject selected provider based on a configuration value or other callable.
62
+ :ref: `selector-provider ` to make injections based on a configuration value, environment variable, or a result of a callable.
63
63
64
64
``Aggregate `` provider is different from the :ref: `selector-provider `. ``Aggregate `` provider doesn't select which provider
65
- to inject and doesn't have a selector. It is always injected "as is". The rest of the interface of both providers is similar.
65
+ to inject and doesn't have a selector. It is a group of providers and is always injected "as is". The rest of the interface
66
+ of both providers is similar.
66
67
67
68
.. note ::
68
69
``Aggregate `` provider is a successor of :ref: `factory-aggregate-provider ` provider. ``Aggregate `` provider doesn't have
69
- a restriction on the provider type, while ``FactoryAggregate `` can aggregate only ``Factory `` providers.
70
+ a restriction on the provider type, while ``FactoryAggregate `` aggregates only ``Factory `` providers.
70
71
71
72
.. disqus ::
0 commit comments