diff --git a/docs/images/singleton.png b/docs/images/singleton.png new file mode 100644 index 00000000..0fc8ae7f Binary files /dev/null and b/docs/images/singleton.png differ diff --git a/docs/images/singleton_internals.png b/docs/images/singleton_internals.png new file mode 100644 index 00000000..3bb05828 Binary files /dev/null and b/docs/images/singleton_internals.png differ diff --git a/docs/providers/singleton.rst b/docs/providers/singleton.rst index ab978b23..e3a18b76 100644 --- a/docs/providers/singleton.rst +++ b/docs/providers/singleton.rst @@ -4,6 +4,10 @@ Singleton providers ``Singleton`` provider creates new instance of specified class on first call and returns same instance on every next call. +Example: + +.. image:: /images/singleton.png + .. code-block:: python """`Singleton` providers example.""" @@ -37,6 +41,8 @@ Singleton providers and injections specified class instance, so, all of the rules about injections are the same, as for ``Factory`` providers. +.. image:: /images/singleton_internals.png + .. note:: Due that ``Singleton`` provider creates specified class instance only on