From ac6412bd412680859e12dfe3b91dc36f6c21a145 Mon Sep 17 00:00:00 2001 From: Roman Mogylatov Date: Thu, 13 Aug 2020 22:57:34 -0400 Subject: [PATCH] Bump version to 3.30.2 --- README.rst | 54 ++++++++++++++++++++++++++++- docs/main/changelog.rst | 4 +++ src/dependency_injector/__init__.py | 2 +- 3 files changed, 58 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 5bbec936..61cff790 100644 --- a/README.rst +++ b/README.rst @@ -52,7 +52,59 @@ What is ``Dependency Injector``? ``Dependency Injector`` is a dependency injection framework for Python. -It provides you with the container and the providers that help you build your application objects: +It helps you implement the dependency injection principle. + +What is dependency injection? +----------------------------- + +Dependency injection is a principle that helps to decrease coupling and increase cohesion. Your +code becomes more flexible, clear and it is easier to test it. + +How to implement dependency injection? +-------------------------------------- + +Objects do not create each other anymore. They provide a way to inject the needed dependency +instead. + +Before: + +.. code-block:: python + + class ApiClient: + + def __init__(self): + self.api_key = os.getenv('API_KEY') + self.timeout = os.getenv('TIMEOUT') + + + class Service: + + def __init__(self): + self.api_client = ApiClient() + +After: + +.. code-block:: python + + class ApiClient: + + def __init__(self, api_key: str, timeout: int): + self.api_key = api_key + self.timeout = timeout + + + class Service: + + def __init__(self, api_client: ApiClient): + self.api_client = api_client + +Who creates the objects now? Look at the next section. + +What does Dependency Injector do? +--------------------------------- + +``Dependency Injector`` provides you with the container and the providers that help you build +your application objects when you apply dependency injection principle: .. code-block:: python diff --git a/docs/main/changelog.rst b/docs/main/changelog.rst index a8b37b16..403e11a0 100644 --- a/docs/main/changelog.rst +++ b/docs/main/changelog.rst @@ -7,6 +7,10 @@ that were made in every particular version. From version 0.7.6 *Dependency Injector* framework strictly follows `Semantic versioning`_ +3.30.2 +------ +- Update README. + 3.30.1 ------ - Update README. diff --git a/src/dependency_injector/__init__.py b/src/dependency_injector/__init__.py index 34fb4b19..849437b1 100644 --- a/src/dependency_injector/__init__.py +++ b/src/dependency_injector/__init__.py @@ -1,6 +1,6 @@ """Dependency injector top-level package.""" -__version__ = '3.30.1' +__version__ = '3.30.2' """Version number that follows semantic versioning. :type: str