This document describes all the changes in Dependency Injector framework that were made in every particular version.

From version 0.7.6 Dependency Injector framework strictly follows Semantic versioning


  • Add support of Python 3.11.

  • Allow Closing to detect dependent resources #633, #636. Thanks Jamie Stumme @StummeJ for the contribution.

  • Update CI/CD to use Ubuntu 22.04.

  • Update CI/CD to actions/checkout@v3, actions/setup-python@v4, actions/upload-artifact@v3, pypa/cibuildwheel@v2.11.3, and actions/download-artifact@v3.

  • Fix install crash on non-utf8 systems #644.

  • Fix a bug in Windows build with default charset #635.

  • Update FastAPI Redis example to use aioredis version 2 #613.

  • Update documentation on creating custom providers #598.

  • Regenerate C sources using Cython 0.29.32.

  • Fix builds badge.


  • Add Configuration.from_json() method to load configuration from a json file.

  • Fix bug with wiring not working properly with functions double wrapped by @functools.wraps decorator. See issue: #454. Many thanks to: @platipo, @MatthieuMoreau0, @fabiocerqueira, @Jitesh-Khuttan.

  • Refactor wiring module to store all patched callable data in the PatchedRegistry.

  • Improve wording on the “Dependency injection and inversion of control in Python” docs page.

  • Add documentation on the @inject decorator.

  • Update typing in the main example and cohesion/coupling correlation definition in “Dependency injection and inversion of control in Python”. Thanks to @illia-v (Illia Volochii) for the PR (#580).

  • Update copyright year.

  • Enable skipped test test_schema_with_boto3_session().

  • Update pytest configuration.

  • Regenerate C sources using Cython 0.29.30.



  • Optimize injections and wiring from x1.5 to x7 times depending on the use case.

  • Fix bug #569: “numpy.typing.NDArray breaks wiring”. Thanks to @VKFisher (Vlad Fisher) for reporting the issue and providing a fix.


  • Add new provider Aggregate. It is a generalized version of FactoryAggregate that can contain providers of any type, not only Factory. See issue #530. Thanks to @zerlok (Danil Troshnev) for suggesting the feature.

  • Add argument as_ to the config.from_env() method for the explicit type casting of an environment variable value, e.g.: config.timeout.from_env("TIMEOUT", as_=int). See issue #533. Thanks to @gtors (Andrey Torsunov) for suggesting the feature.

  • Add .providers attribute to the FactoryAggregate provider. It is an alias for FactoryAggregate.factories attribute.

  • Add .set_providers() method to the FactoryAggregate provider. It is an alias for FactoryAggregate.set_factories() method.

  • Add string imports for Factory, Singleton, Callable, Resource, and Coroutine providers, e.g. Factory("module.Class"). See issue #531. Thanks to @al-stefanitsky-mozdor for suggesting the feature.

  • Fix Dependency provider to don’t raise “Dependency is not defined” error when the default is a falsy value of proper type. See issue #550. Thanks to @approxit for reporting the issue.

  • Refactor FactoryAggregate provider internals.

  • Update logo on Github and in docs to support dark themes and remove some imperfections.


  • Add support of Python 3.10.

  • Improve wiring with adding importing modules and packages from a string container.wire(modules=["yourapp.module1"]).

  • Add container wiring configuration wiring_config = containers.WiringConfiguration().

  • Add support of with statement for container.override_providers() method.

  • Add Configuration(yaml_files=[...]) argument.

  • Add Configuration(ini_files=[...]) argument.

  • Add Configuration(pydantic_settings=[...]) argument.

  • Drop support of Python 3.4. There are no immediate breaking changes, but Dependency Injector will no longer be tested on Python 3.4 and any bugs will not be fixed.

  • Announce the date of dropping Python 3.5 support (Jan 1st 2022).

  • Fix Dependency.is_defined attribute to always return boolean value.

  • Fix envs_required=False behavior in Configuration.from_*() methods to give a priority to the explicitly provided value.

  • Update documentation and fix typos.

  • Regenerate C sources using Cython 0.29.24.

  • Migrate tests to pytest.


  • Update docs.


  • Fix a wiring bug with improper resolving of Provide[some_provider.provider].

  • Fix a typo in Factory provider docs service.add_attributes(clent=client) #499. Thanks to @rajanjha786 for the contribution.

  • Fix a typo in boto3 example #511. Thanks to @whysage for the contribution.


  • Add support of non-string keys for FactoryAggregate provider.

  • Improve FactoryAggregate typing stub.

  • Improve resource subclasses typing and make shutdown definition optional PR #492. Thanks to @EdwardBlair for suggesting the improvement.

  • Fix type annotations for .provides. Thanks to Thiago Hiromi @thiromi for the fix PR #491.

  • Fix environment variables interpolation examples in configuration provider docs {$ENV} -> ${ENV}. Thanks to Felipe Rubio @krouw for reporting the issue and fixing yaml example PR #494.

  • Fix @containers.copy() decorator to respect dependencies on parent providers. See issue #477. Thanks to Andrey Torsunov @gtors for reporting the issue.

  • Fix typing stub for container.override_providers() to accept other types besides Provider.

  • Fix runtime issue with generic typing in resource initializer classes resources.Resource and resources.AsyncResource. See issue #488. Thanks to @EdwardBlair for reporting the issue.


  • This release was removed from PyPI. It was inconsistently published because project has reached a PyPI size limit. Changes from this release are published on PyPI in next version.


  • Update wiring to support modules provided as packages. See issue #481. Thanks to @Sadbot for demonstrating the issue.


  • Fix a container issue with supporting custom string types. See issue #479. Thanks to @ilsurih for reporting the issue.


  • Add support of six 1.16.0.


  • Fix a bug with reverse shutdown order in container.shutdown_resources(). See issue #432. Thanks to Saulius Beinorius for bringing up the issue.


  • Update container.shutdown_resources() to respect dependencies order while shutdown. See issue #432. Thanks to Saulius Beinorius for bringing up the issue.


  • Add option envs_required for configuration provider .from_yaml() and .from_ini() methods. With envs_required=True methods .from_yaml() and .from_ini() raise an exception when encounter an undefined environment variable in the configuration file. By default this option is set to false for preserving previous behavior envs_required=False.

  • Add raising of an exception in configuration provider strict mode when provider encounters an undefined environment variable in the configuration file.

  • Update configuration provider environment variables interpolation to replace undefined environment variables with an empty value.

  • Update configuration provider to perform environment variables interpolation before passing configuration file content to the parser.


  • Add support of default value for environment variable in INI and YAML configuration files with ${ENV_NAME:default} format. See issue #459. Thanks to Maksym Shemet @hbmshemet for suggesting the feature.

  • Add method Configuration.from_value(). See issue #462. Thanks to Mr. Slack Clone for bringing it up in the comments for configuration provider docs.


  • This fix a typo in di_in_python.rst doc. Thanks to @loingo95 for the fix.


  • Improve wiring fault tolerance. See issue #441. Thanks to @ssheng for reporting the issue.


  • Fix a bug with List provider not working in async mode. See issue: #450. Thanks to @mxab for reporting the issue.

  • Add async mode tests for List and Dict provider.


  • Add ContextLocalSingleton provider. See PR: #443. Thanks to @sonthonaxrk for the contribution.

  • Regenerate C sources using Cython 0.29.22.


  • Fix an issue with Dict provider non-string keys. See issue: #435. Thanks to @daniel55411 for reporting the issue.

  • Fix Flask scoped contexts example. See issue: #440. Thanks to @sonthonaxrk for the contribution.


  • Fix ThreadSafeSingleton synchronization issue. See issue: #433. Thanks to @garlandhu for reporting the issue.


  • Implement providers’ lazy initialization.

  • Improve providers’ copying.

  • Improve typing in wiring module.

  • Fix wiring module loader uninstallation issue.

  • Fix provided instance providers error handing in asynchronous mode.

  • Fix overridden configuration option cache resetting. See issue: #428. Thanks to @dcendents for reporting the issue.


  • Remove restriction to wire a dynamic container.


  • Fix wiring to not crash on missing signatures. See issue: #420. Thanks to @Balthus1989 for reporting the issue.


  • Fix recursive copying issue in Delegate provider. See issue: #245. Thanks to @GitterRemote for reporting the issue.

  • Add docs and example for Factory.add_attributes() method.

  • Remove legacy css file.

  • Remove unittest2 test dependency.


  • Implement context manager interface for resetting a singleton provider. See issue: #413. Thanks to @Arrowana for suggesting the improvement.

  • Implement overriding interface to container provider. See issue: #415. Thanks to @wackazong for bringing up the use case.


  • Fix async mode mode exception handling issue in Dependency provider. See issue: #409. Thanks to @wackazong for reporting the issue.

  • Fix links to boto3 example.


  • Add wiring injections into modules and class attributes. See issue: #411. Many thanks to @brunopereira27 for submitting the use case.


  • Introduce wiring inspect filter to filter out flask.request and other local proxy objects from the inspection. See issue: #408. Many thanks to @bvanfleet for reporting the issue and help in finding the root cause.

  • Add boto3 example.

  • Add tests for .as_float() modifier usage with wiring.

  • Make refactoring of wiring module and tests. See PR # #406. Thanks to @withshubh for the contribution:

    • Remove unused imports in tests.

    • Use literal syntax to create data structure in tests.

  • Add integration with a static analysis tool DeepSource.


  • Add wiring by string id.

  • Improve error message for Dependency provider missing attribute.


  • Amend docs and add another example for @containers.copy() decorator.


  • Add application-multiple-containers-runtime-overriding example. This example demonstrates how to build application from multiple containers and override one container config from another one in the runtime. See issue: #207.

  • Add attributes forwarding for the Dependency provider.


  • Add docs on @containers.copy() decorator.

  • Refactor @containers.copy() decorator.

  • Refactor async mode support in containers module.


  • Fix docs publishing.


  • Fix a typo.


  • Fix mistakenly processed awaitable objects in async mode. This bug has corrupted fastapi-redis example causing pool exhaustion. Thanks to @iliamir and Valery Komarov for finding and reporting the issue.

  • Refactor async mode.


  • Improve async mode exceptions handling.

  • Fix double printing of exception when async resource initialization causes an error.


  • Hotfix a bug with importing FastAPI Request. See issue: #398. Thanks to @tapm for reporting the bug.


  • Add support of aliases for Configuration provider. See issue: #394. Thanks to @gtors for suggesting the feature.


  • Pin sphinx version to hotfix docs build.

  • Fix a typo in docs.


  • Add method container.check_dependencies() to check if all container dependencies are defined. See issue: #383. Thanks to @shaunc for suggesting the feature.

  • Add container name to the representation of the Dependency provider.

  • Add docs cross-links between Singleton provider and “Reset container singletons” pages.


  • Improve Dependency provider error message: when dependency is undefined, error message contains its name.


  • Move docs on container “self” injections to “Providers” section.


  • Refactor containers module.


  • Add container “self” injections. See issue: #364. Thanks to @shaunc for suggesting the feature.


  • Add singleton.full_reset() method to reset all underlying singleton providers.

  • Fix container.reset_singleton() to reset all provider types, not only Singleton.

  • Improve container.traverse(types=[...]) and provider.traverse(types=[...]) typing stubs to return types -typed iterator.

  • Update docs on creating custom providers with a requirement to specify .related property.


  • Add container.reset_singleton() method to reset container singletons.

  • Refactor container.apply_container_providers_overridings() to use container.traverse(). This enables deep lazy initialization of Container providers.

  • Add tests for Selector provider.

  • Add tests for ProvidedInstance and MethodCaller providers.

  • Update Makefile to make Python 3 tests to be a default test command: make test.



  • Add container base class containers.Container. DynamicContainer and DeclarativeContainer become subclasses of the Container. See issue: #386. Thanks to @ventaquil for reporting the issue.


  • Add Configuration.from_pydantic() method to load configuration from a pydantic settings.


  • Add container providers traversal.

  • Fix an issue with container.init_resource() and container.shutdown_resource() ignoring nested resources that are not present on the root level. See issue: #380. Thanks to @approxit for finding and reporting the issue.

  • Add .provides attribute to Singleton and its subclasses. It’s a consistency change to make Singleton match Callable and Factory interfaces.

  • Add .initializer attribute to Resource provider.

  • Update string representation of Resource provider.


  • Fix PyCharm typing warning “Expected type ‘Optional[Iterable[ModuleType]]’, got ‘List[]’ instead” in container.wire() method.


  • Fix declarative container metaclass bug: parent container providers replaced child container providers. See issue: #367. Many thanks to Shaun Cutts for finding and report the issue.


  • Add default argument to the dependency provider: Dependency(..., default=...). See issue: #336. Many thanks to Shaun Cutts for providing the use case.


  • Add wiring import hook that auto-wires dynamically imported modules. See issue: #365. Thanks to @Balthus1989 for providing a use case.


  • Replace weakrefs with normal refs in ConfigurationOption to support Container().provider() use case. Test that it does not introduce a memory leak. See issue: #358#issuecomment-764482059. Many thanks to @Minitour for reporting the issue.


  • Fix a bug in providers.Container when it’s declared not at class root level. See issue #379. Many thanks to @approxit for reporting the issue.


  • Fix a bug in @containers.copy to improve replacing of subcontainer providers. See issue #378. Many thanks to Shaun Cutts for reporting the issue.


  • Add loader argument to the configuration provider Configuration.from_yaml(..., loader=...) to override the default YAML loader. Many thanks to Stefano Frazzetto for suggesting an improvement.

  • Make security improvement: change default YAML loader to the custom yaml.SafeLoader with a support of environment variables interpolation. Many thanks to Stefano Frazzetto for suggesting an improvement.

  • Update configuration provider .from_*() methods to raise an exception in strict mode if configuration file does not exist or configuration data is undefined. Many thanks to Stefano Frazzetto for suggesting an improvement.

  • Add required argument to the configuration provider .from_*() methods to specify mandatory configuration sources. Many thanks to Stefano Frazzetto for suggesting an improvement.

  • Fix a bug with asynchronous injections: async providers do not work with async dependencies. See issue: #368. Thanks @kolypto for the bug report.

  • Refactor asynchronous injections.

  • Add extra tests for asynchronous injections.

  • Migrate CI to Github Actions.



  • Fix a bug in Resource that cause failure when async resource depends on another async resource. See issue #361. Thanks @kolypto for the bug report.


  • Fix a Python 3.9 specific bug in wiring module: introspection doesn’t work for builtin types.GenericAlias. This resulted in wiring failure for modules importing queue.Queue. See issue #362. Thanks @ventaquil for the bug report.

  • Switch Coveralls reporting Travis Job to run on Python 3.9.


  • Add strict mode and required modifier for Configuration provider. See issue #341. Thanks ms-lolo for the feature request.


  • Fix a bug in the Configuration provider to correctly handle undefined values. See issue #358. Many thanks to Stefano Frazzetto for reporting the issue.


  • Add .dependencies attribute to the DeclarativeContainer and DynamicContainer. It returns dictionary of container Dependency and DependenciesContainer providers. See issue #357. Many thanks to Shaun Cutts for suggesting the feature.


  • Fix a bug in the Configuration provider to correctly handle overriding by None. See issue #358. Many thanks to Stefano Frazzetto for reporting the issue.


  • Fix Container provider to apply context overridings on root container initialization. See issue #354. Many thanks to Shaun Cutts for submitting the issue.

  • Hotfix for version 4.8.0: fix side effect in Container provider overriding.


  • Fix declarative container multi-level inheritance issue. See issue #350. Many thanks to Shaun Cutts for submitting the issue.


  • Add support of overriding Container provider. See issue #354. Many thanks to Shaun Cutts for submitting the issue.


  • Add container injection support for wiring.


  • Add Disqus comments widget to the provider’s async injections docs page.


  • Add support of async injections for providers.

  • Add support of async injections for wiring.

  • Add support of async initializers for Resource provider.

  • Add FastAPI + Redis example.

  • Add ARM wheel builds. See issue #342 for details.

  • Fix a typo in ext.flask deprecation warning. See PR #345 for details. Thanks to Fotis Koutoupas for the fix.

  • Update copyright year.


  • Fix manylinux wheels uploading issue. See issue #333 for details. Thanks to Richard Jones for reporting the issue.


  • Fix 4.5.2 degradation bug in wiring @inject with not working FastAPI.Depends directive. See issue #331 for details. Thanks to Juan Esteban Marín for reporting the issue.

  • Add FastAPI tests.


  • Fix a bug in wiring @inject with not properly working FastAPI.Depends directive. See issue #330 for details. Thanks to Lojka-oops for reporting the issue.


  • Fix flake8 issue in Commands  and Handlers example.


  • Add support of non-string keys for Dict provider.

  • Add simple FastAPI example.

  • Add Commands  and Handlers example from issue #327.

  • Add extra typing test for provided instance of DependenciesContainer provider.


  • Improve FastAPI integration: handle Depends(Provide[...]).

  • Update FastAPI example.

  • Remove a typo from the Flask tutorial.


  • Add @inject decorator. It helps to fix a number of wiring bugs and make wiring be more resilient.

  • Refactor wiring module.

  • Update documentation and examples to use @inject decorator.

  • Add Flask blueprints example.

  • Fix wiring bug when wiring doesn’t work with the class-based decorators.

  • Fix wiring bug when wiring doesn’t work with the decorators that doesn’t use functools.wraps(...).

  • Fix wiring bug with @app.route(...) -style decorators (Flask, Sanic, FastAPI, etc.).

  • Fix wiring bug when wiring doesn’t work with Flask blueprints.


  • Add FastAPI example.


  • Add a hotfix to support wiring for FastAPI endpoints.



  • Fix changelog typo.


  • Fix a bug in wiring module that caused multiple imports of the modules when .wire(packages=[...]) is used (See issue #320). Thanks to Federico iskorini for reporting the issue.


  • Fix a bug in Configuration provider that resulted in not working .reset_override() (See issue #319). Thanks to Jun lust4life for reporting the issue and suggesting a fix.


  • Fix a bug in wiring with improper patching of @classmethod and @staticmethod decorated methods (See issue #318).


  • Fix a bug in wiring with mistakenly initialized and shutdown resource with Closing marker on context argument providing.


  • Fix README.


  • Implement per-function execution scope for Resource provider in tandem with wiring.Closing.


  • Add support of Python 3.9.

  • Update readme.


  • Update asyncio daemon, single- and multi-container examples to use Resource provider.


  • Add CI job to build and push documentation to S3 bucket.


  • Fix wiring of multiple containers (see issue #313). Thanks to iskorini for reporting the issue.

  • Fix wiring for @classmethod.


  • Fix Travis CI windows and MacOS builds.


  • Fix version of cibuildwheel==1.63.

  • Update Travis CI webhooks to fix builds triggering.


  • Migrate from to to fix build issues.

  • Add explicit installation of certifi for Windows build to resolve build problems.


  • Bump version of cibuildwheel>=1.5.1 to resolve Windows build problem.


  • Fix a few typos in Resource provider docs.


  • Add Resource provider.

  • Add Dict provider.

  • “Un-deprecate” @containers.override() and @containers.copy() decorators ( see Issue 301 for more information).

  • Add favicon.

  • Remove redirects that occur while getting badge images to optimize docs load speed.

  • Update license year.

  • Update short description on PyPI.


  • Fix wiring for top-level package


  • Move .provided attribute to providers.Provider.

  • Update all links in documentation and examples to use https:// instead of http.


  • Fix typing stubs for container.override() method.


  • Deprecate @containers.override() and @containers.copy() decorators.

  • Update changelog of version 4.0.0 so it lists all deprecated features.


  • Fix typing stubs for @container.override() and @containers.copy() decorators ( see PR 302). Thanks to JarnoRFB for reporting the issue.


  • Extend Configuration.from_ini() and Configuration.from_yaml() typing stubs to accept pathlib.Path. The methods were already compatible with pathlib.Path and just did not accept it in their signatures (see PR 300). Fix was provided by JarnoRFB. Many thanks to you again, JarnoRFB.


New features:

  • Add wiring feature.


  • Deprecate ext.aiohttp module in favor of wiring feature.

  • Deprecate ext.flask module in favor of wiring feature.

  • Deprecate .delegate() provider method in favor of .provider attribute.


  • Remove deprecated types module.


  • Update flask tutorial.

  • Update aiohttp tutorial.

  • Update asyncio daemon tutorial.

  • Update CLI application tutorial.


  • Add django example.

  • Add sanic example.

  • Update aiohttp example.

  • Update flask example.

  • Update asyncio daemon example.

  • Update movie-lister example.

  • Update CLI application example.


  • Regenerate C sources using Cython 0.29.21.

  • Improve documentation and README (typos removal, rewording, etc).


  • Add native support of the generics to the providers: some_provider = providers.Provider[SomeClass].

  • Deprecate module types.

  • Add documentation page on providers typing and mypy support.

  • Update README.


  • Fix a typo in README.


  • Update API documentation.

  • Remove not relevant “speech” example.

  • Fix a few typos.


  • Update “DI in Python” documentation page.

  • Delete “What is DI?” documentation page.

  • Delete “engines cars” example mini app.

  • Update README.


  • Refactor “use cases” example.

  • Refactor “password hashing” example.

  • Refactor “chained factories” pattern example.

  • Refactor “factory of factories” pattern example.

  • Fix declarative container mypy stub to __init__ to accept not only providers.

  • Refactor main module of the “decoupled packages” example.

  • Delete “api client” example mini app.

  • Delete “mail service” example mini app.


  • Add “Decoupled packages” example.

  • Delete “Bundles” examples mini application.


  • Add application examples with single and multiple containers.

  • Remove “Services” application examples.

  • Split examples page into “Examples” with main examples and “Other Examples” with secondary examples.

  • Move “Installation” page to “Introduction” section.


  • Fix README.


  • Update “What is What is dependency injection?” documentation page.

  • Update README.

  • Fix a bunch of typos.


  • Update index documentation page.

  • Make multiple improvements and fixes for the providers documentation.

  • Update “Key Features” documentation page.

  • Remove “Structure of Dependency Injector” documentation page.

  • Edit “Feedback” documentation page.


  • Update providers overriding documentation and rework examples.

  • Update documentation on injecting provided object attributes, items or method calls.

  • Update documentation and example on creating a custom provider.

  • Update providers index documentation page to give better overview of providers functionality.

  • Fix mypy stub of the Provider to specify the protected ._copy_overridings() method.

  • Update copyright year in the documentation.


  • Fix minor issues in the providers documentation and examples.


  • Update documentation and rework examples for: Singleton, Callable, Coroutine, Object, List, Configuration, Selector, and Dependency providers.

  • Fix mypy stub of the DeclarativeContainer to specify the __init__ interface.


  • Update Factory provider documentation.

  • Rework Factory provider examples.


  • Add typing stubs.


  • Fix few typos on README and docs main pages.


  • Make a fix in the factory delegation example (thanks to Joël Bourgault for finding and reporting the issue).


  • Update DI Demo 2 example and READ to make typed configuration option injection.


  • Add a feature that helps to explicitly specify the type of the configuration option value before the injection.

  • Add disqus comments to the docs page on injecting provided instance attributes, items, etc.


  • Add a feature that helps to inject provided instance attribute, item, or method call result (see Issue 281). Design for this feature was provided by JarnoRFB. Many thanks to you, JarnoRFB.


  • Update README.


  • Update README.

  • Update containers documentation and examples.


  • Update README.


  • Update README.

  • Add one more example.


  • Rework Movie Lister example.

  • Add tutorial for building Movie Lister.

  • Make some rewording for the other tutorials.

  • Fix a couple of typos.


  • Update README with the more direct message on what is Dependency Injector and how is it different from the other frameworks.

  • Change the example code in the README.

  • Add FAQ to the README.

  • Update documentation key features and index pages.


  • Fix typos in the asyncio + Dependency Injector monitoring daemon tutorial.


  • Add asyncio + Dependency Injector example monitoring-daemon-asyncio.

  • Add asyncio + Dependency Injector monitoring daemon tutorial.

  • Fix a typo in the docblock of the Configuration provider.

  • Fix multiple typos in the flask and aiohttp tutorials.

  • Fix Makefile to run aiohttp integration tests on Python 3.5+.


  • Add deep init injections overriding for Factory provider.

  • Add asyncio monitoring daemon example.


  • Add configuration itemselector feature (see Issue 274).

  • Re-design Configuration provider implementation.

  • Update giphynav-aiohttp to remove doubled “if not query” (many thanks to Oleg Baranov for the feedback).


  • Fix aiohttp tutorial typos.


  • Add aiohttp tutorial.

  • Fix Flask tutorial typos and change some wording.


  • Update Google Search Console verification meta tag.

  • Update meta description.


  • Add Aiohttp integration module dependency_injector.ext.aiohttp.

  • Add Aiohttp + Dependency Injector example giphynav-aiohttp.


  • Fix Flask tutorial code issues, typos and change some wording.



  • Add Flask tutorial.

  • Add PyPI classifiers.


  • Migrate docs to alabaster theme.

  • Add Bootstrap extension to the ghnav-flask example.

  • Add stubs for the tutorials to the docs.


  • Hotfix changelog typo.


  • Hotfix ghnav-flask example to read Github token from environment variable.


  • Re-design Flask integration.

  • Make cosmetic fixes for Selector provider docs.


  • Hotfix Windows builds.


  • Add Flask integration module dependency_injector.ext.flask.

  • Add Flask + Dependency Injector example ghnav-flask.

  • Add Factory.provides attribute. It is an alias to the Factory.cls.

  • New README.


  • Add logo.


  • Start distributing wheels for Linux, MacOS, and Windows (thanks to Travis CI and cibuildwheel).

  • Start using twine for publishing package on PyPI.

  • Fix Travis CI configuration file warnings.


  • Add Selector provider.

  • Fix Configuration.override() to return OverridingContext for non-dictionary values.


  • Add interpolation of environment variables to Configuration.from_yaml() and Configuration.from_ini().

  • Add ignoring of IOError to Configuration.from_yaml().


  • Add Configuration.from_yaml() method to load configuration from the yaml file.

  • Add Configuration.from_ini() method to load configuration from the ini file.

  • Add Configuration.from_dict() method to load configuration from the dictionary.

  • Add Configuration.from_env() method to load configuration from the environment variable.

  • Add default value for name argument of Configuration provider.

  • Add documentation for Configuration provider.

  • Remove undocumented positional parameter of DependenciesContainer provider.


  • Fix DynamicContainer deep-copying bug.


  • Add Container provider.

  • Add Configuration providers linking.


  • Update to support Python 3 (thanks to RobinsonMa, PR #252).

  • Fix Disqus comments.

  • Fix warnings in API docs.



  • Fix changelog typo.


  • Add downloads badge.


  • Update a link to the PyPi page on the README page.


  • Fix a typo in the link to the PyPi on the “Dependency Injection in Python” documentation page.

  • Fix a couple of typos in the list of key features on the “Key Features” and index documentation pages.

  • Update a link to the PyPi page on a couple of documentation pages.


  • Fix a typo in the installation instructions on the README page and in the documentation.


  • Fix a couple of typos in the README.

  • Fix a couple of types in the diagram of “Engines-Cars” example.


  • Add Python 3.8 support.

  • Add PyPy 3.6 support.

  • Add support of six 1.14.0.

  • Add support of six 1.13.0.

  • Regenerate C sources using Cython 0.29.14.

  • Remove Python 2-ish inheritance from object in example modules.

  • Replace Python 2-ish super(class, self).__init__() calls with Python 3-ish super().__init__() in example modules.

  • Fix doc block errors in example modules, including related to PEP257-compliance.

  • Clean up tox.ini file.


  • Fix 3.14.11 degradation issue causing inability of using Delegate provider in DeclarativeContainer when this container is instantiated with overriding of delegating provider (thanks to GitterRemote, issue details are here #235).


  • Fix issue causing creation of a copy of provided object by Object provider when it was a part of DeclarativeContainer and this container was instantiated (thanks to davidcim, issue details are here #231).


  • Make spelling fix for the list of contributors.


  • Improve README - minor English nitpicking (thanks to supakeen).


  • Regenerate C sources using Cython 0.29.13.


  • Fix typo on “Dependency injection and inversion of control in Python” docs page (thanks to Dmitry (xotonic)).


  • Fix FactoryAggregate provider copying issue.

  • Regenerate C sources using Cython 0.29.7.


  • Fix issue causing ThreadLocalSingleton provider to return None after reset (thanks to Jeroen Rietveld).

  • Add test for ThreadLocalSingleton provider reset functionality (thanks to Jeroen Rietveld).

  • Regenerate C sources using Cython 0.29.6.


  • Fix typo in providers doc (thanks to Vlad Ghita).


  • Fix issue with copying providers that have system streams injections (sys.stdin, sys.stdout and sys.stderr).

  • Add support of six 1.12.0.

  • Regenerate C sources using Cython 0.29.2.


  • Set Cython language_level=2.


  • Fix bug #208: version 3.14.0 hasn’t worked on Python 3.5.2 (thanks to Jeroen Entjes).

  • Remove deprecated assertEquals from tests.

  • Regenerate C sources using Cython 0.29.


  • Add Coroutine provider.

  • Add DelegatedCoroutine provider.

  • Add AbstractCoroutine provider.

  • Add CoroutineDelegate provider.

  • Fix type-hinting of *args & **kwargs that was specified in doc blocks of various providers and caused inspection problems in PyCharm.

  • Regenerate C sources using Cython 0.28.5.


  • Add additional benchmark of Factory provider.

  • Add tests and tox.ini to the distribution, so that they could be used after package is installed (thanks to Tobias Happ).


  • Fix typo on “Chained Factories” pattern docs page.


  • Add Python 3.7 support.

  • Drop Python 3.3 support.

  • Drop Python 2.6 support.

  • Add example of “Chained Factories” pattern.

  • Add example of “Factory of Factories” pattern.


  • Fix bug #200.

  • Make some refactoring #199.


  • Fix bug #198.

  • Regenerate C sources using Cython 0.28.4.


  • Apply code style fixes to “services_v2” example miniapp.


  • Update main page example from “services_v1” to “services_v2”.

  • Fix few typos on main page.

  • Add new example miniapp “password_hashing”.

  • Add new example miniapp “services_v2”.

  • Rename example miniapp “services” to “services_v1”.

  • Fix incompatibility issue between Python 3.3, pip 10.0.0 and virtualenv 16.0.0 (details) that caused failures of Python 3.3 tests on Travis.

  • Regenerate C sources using Cython 0.28.3.


  • Regenerate C sources using Cython 0.28.2.


  • Fix padding problem in code samples in docs.


  • Fix padding problem in code samples in docs.

  • Remove autodoc from the list of documentation dependencies.


  • Fix small typo in documentation (thanks to James Lafa).


  • Improve Configuration provider overriding logic.

  • Refactor Configuration provider.

  • Improve DependenciesContainer provider overriding logic.

  • Update “services” example miniapp.

  • Update “bundles” example miniapp.


  • Add DependenciesContainer provider.

  • Add “use_cases” example miniapp.

  • Update documentation requirements to use fixed version of sphinxcontrib-disqus.


  • Fix docs build problem (sphinx is frozen on 1.5.6 version because of incompatibility with sphinxcontrib-discus).

  • Add badge for docs.


  • Change initialization of declarative container, so it accepts overriding providers as keyword arguments - DeclarativeContainer(**overriding_providers).

  • Add method to dynamic catalog for setting groups of providers - DynamicContainer.set_providers(**providers).

  • Add method to dynamic catalog for overriding groups of providers - DynamicContainer.set_providers(**overriding_providers).

  • Rename ExternalDependency provider to Dependency.

  • Add default value for instance_of argument of Dependency provider - Dependency(instance_of=object).

  • Fix bug when copying Configuration provider.

  • Regenerate C sources using Cython 0.27.3.

  • Add “bundles” example miniapp.


  • Fix padding problem in code samples in docs (part 2).


  • Fix padding problem in code samples in docs.


  • Add DeclarativeContainer.containers attribute that stores dictionary of nested containers.

  • Fix bug related to double-overridden providers (provider1 -> provider2 -> provider3).


  • Add support of six 1.11.0.


  • Add FactoryAggregate provider.

  • Add Provider.provider dynamic attribute that return new provider’s delegate (alias of method Provider.delegate()).

  • Add support of six 1.11.0.

  • Regenerate C sources using Cython 0.27.1.


  • Regenerate C sources using Cython 0.26.


  • Add CallableDelegate provider.

  • Add FactoryDelegate provider.

  • Add SingletonDelegate provider.


  • Add functionality for initializing Configuration provider with default values.


  • Code style fixes in providers module.


  • Correct typo in changelog.


  • Add “Useful links” section to the “Dependency injection and inversion of control in Python” article.


  • Remove non-ascii character from README. This character created an installation problem on Debian (Python 3.4).


  • Add Provider.last_overriding read-only property that points to last overriding provider, if any. If target provider is not overridden, None would be returned.

  • Update example of writing custom providers.

  • Update movie lister example miniapp.

  • Update source of badge.


  • Update doc block for Provider.overriding_lock attribute.


  • Make Provider overriding methods thread safe: Provider.override(provider), Provider.reset_last_overriding(), Provider.reset_override().

  • Refactor storage locking of ThreadSafeSingleton provider.

  • Fix few pydocstyle errors in examples.


  • Update movie lister example miniapp with AbstractFactory provider.


  • Add AbstractCallable provider.

  • Add AbstractFactory provider.

  • Add AbstractSingleton provider.

  • Optimize calling of overridden providers (~15% faster).


  • Fix minor bug related to patch of Configuration provider in version 3.3.6 - special attributes were identified by formula __{text} - now they are identified by formula __{text}__, that is more correct according to Python Data Model.


  • Patch Configuration provider to raise AttributeError when there is an attempt to access special attribute like __module__ or __name__ (this behaviour is identical to behaviour of object).

  • Apply minor refactoring for providers module.

  • Remove cythonization from travis building process.


  • [Refactoring] Consolidate all containers in dependency_injector.containers module.

  • [Refactoring] Consolidate all providers in dependency_injector.providers module.


  • Change __module__ attribute for all members of dependency_injector.containers package to point to package, but not to package modules.

  • Regenerate C sources using Cython 0.25.2.


  • Update services miniapp example.


  • Add comments for documentation.

  • Fix reference to version in api docs.

  • Fix title underline in containers api docs.

  • Update documentation copyright year.

  • Update example version in installation document.


  • Add some improvements to the documentation.


  • Add support of Python 3.6.


  • Add description of structure into README.

  • Fix documentation errors.


  • Switch to single version of documentation for getting shorter urls (without /en/stable/). Add appropriate redirects for compatibility with previous links.

  • Update copyright date.


  • Add examples into README.

  • Make minor documentation updates.


  • Change name of version variable to follow PEP8: VERSION -> __version__.


  • Update services miniapp example.


  • Add Configuration provider for late static binding of configuration options.


  • Refactor provider internals: C functions naming scheme and code layout.

  • Add Terrence Brannon (metaperl) to the list of contributors.


  • Move inline functions from class level to module level for removing them from virtual table and enable inlining.


  • Fix flake8 E305 error in examples.


  • Remove public (extern) modifier utils constants.

  • Fix flake8 E305 error in examples.


  • Fix minor typo in README.


  • Add “Services mini application” example.

  • Fix minor error in Factory provider API doc.


  • Add *.c source files under version control.

  • Change keywords.


  • Providers

    1. All providers from dependency_injector.providers package are implemented as C extension types using Cython.

    2. Add BaseSingleton super class for all singleton providers.

    3. Make Singleton provider not thread-safe. It makes performance of Singleton provider 10x times faster.

    4. Add ThreadSafeSingleton provider - thread-safe version of Singleton provider.

    5. Add ThreadLocalSingleton provider - Singleton provider that uses thread-local storage.

    6. Remove provides attribute from Factory and Singleton providers.

    7. Add set_args() and clear_args() methods for Callable, Factory and Singleton providers.

  • Containers

    1. Module dependency_injector.containers was split into submodules without any functional changes.

  • Utils

    1. Module dependency_injector.utils is split into dependency_injector.containers and dependency_injector.providers.

  • Miscellaneous

    1. Remove @inject decorator.

    2. Add makefile (clean, test, build, install, uninstall & publish commands).

    3. Update repository structure:

    1. Sources are moved under src/ folder.

    2. Tests are moved under tests/unit/ folder.


  • Fix typo in README.


  • Add github badges to readme and docs index pages.

  • Update service names in services example miniapp.

  • Create engines & cars example miniapp.


  • Move fixtures to separate module in movie lister example.


  • Fix typo in README.


  • Update README.

  • Update docs index page.


  • Fix typo in README.


  • Update README.


  • Update README.


  • Update README.


  • Update examples.


  • Deprecate inject decorator.


  • Normalize package names by PEP-503.


  • Add ThreadLocalSingleton and DelegatedThreadLocalSingleton providers.

  • Add documentation section about singleton providers and multi-threading.

  • Update API docs of creational providers.


  • Introduce new injections style for Callable, Factory & Singleton providers.

  • Drop providers: Static, Value, Function, Class, Config.

  • Increase performance of making injections in 2 times (+100%).

  • Drop method injections.

  • Simplify providers overriding system.

  • Replace catalogs package with containers module.

  • Drop all backward compatibilities for 1.x.

  • Refactor most of the components.

  • Update documentation.


  • Add add_injections() method to Callable, DelegatedCallable, Factory, DelegatedFactory, Singleton and DelegatedSingleton providers.

  • Fix bug with accessing to declarative catalog attributes from instance level.


  • Fix some typos in introduction section of documentation.


  • Add some changes into introduction section of documentation.


  • Move project to

  • Move project docs to


  • Add some documentation improvements.


  • Add @copy decorator for copying declarative catalog providers.

  • Add line numbers for all code samples in documentation.

  • Add “Examples” section into documentation.

  • Add “Movie Lister” example.

  • Add “Services” example.

  • Move project documentation into organisation’s domain (


  • [Refactoring] split catalogs module into smaller modules, catalogs module become a package.

  • [Refactoring] split providers module into smaller modules, providers module become a package.

  • Update introduction documentation.


  • Update package information and documentation.


  • Add Provider.provide() method. Provider.__call__() become a reference to Provider.provide().

  • Add provider overriding context.

  • Update main examples and README.


  • Update README.


  • Add “catalog-providing-callbacks” example and several tests for it.


  • Add override decorator in providers module.

  • Add storing of originally decorated instance in inject decorator.

  • Add several refactorings.

  • Switch to pydocstyle tool from pep257.


  • Update README.


  • Add one more example in README (inline providers and injections).


  • Add cls alias for provides attributes of Factory, DelegatedFactory, Singleton and DelegatedSingleton providers.


  • Fix typo in provider’s error message.


  • Update documentation.


  • Optimize internals of providers.

  • Optimize Callable provider.

  • Optimize Factory provider.

  • Optimize Singleton provider.


  • Update documentation and description.


  • Add meta description & keywords on docs index page.


  • Drop support of Python 3.2.


  • Update PyPi info.



  • Add DelegatedCallable provider.

  • Add DelegatedFactory provider.

  • Add DelegatedSingleton provider.

  • Add some documentation improvements.


  • Add possibility to specialize Factory provided type.

  • Add possibility to specialize Singleton provided type.

  • Add possibility to specialize DeclarativeCatalog provider type.

  • Add possibility to specialize DynamicCatalog provider type.

  • Make some refactorings for providers.


  • Improve representation of providers and injections.


Previous state of Dependency Injector framework (0.11.0 version) is considered to be production ready / stable, so current release is considered to be the first major release.

  • Increase major version.

  • Backward compatibility with all previous versions above 0.7.6 has been saved.


  • Rename AbstractCatalog to DeclarativeCatalog (with backward compatibility).

  • Rename catalog module to catalogs with backward compatibility.

  • Implement dynamic binding of providers for DeclarativeCatalog.

  • Add DynamicCatalog.

  • Change restrictions for providers-to-catalogs bindings - provider could be bound to several catalogs with different names.

  • Restrict overriding of providers by themselves.

  • Restrict overriding of catalogs by themselves.

  • Make DeclarativeCatalog.last_overriding attribute to be None by default.

  • Make Provider.last_overriding attribute to be None by default.

  • Refactor catalogs and providers modules.

  • Add API documentation

  • Improve user’s guides and examples.


  • Add more representable implementation for AbstractCatalog and AbstractCatalog.Bundle.


  • Remove VERSION file from


  • Update example docblocks.


  • Fix bug with injecting entities that implement __getattr__.


  • Update some examples.


  • Add functionality for creating AbstractCatalog provider bundles.

  • Improve AbstractCatalog inheritance.

  • Improve AbstractCatalog overriding.

  • Add images for catalog “Writing catalogs” and “Operating with catalogs” examples.

  • Add functionality for using positional argument injections with Factory, Singleton, Callable providers and inject decorator.

  • Add functionality for decorating classes with @inject.

  • Add Singleton.injections attribute that represents a tuple of all Singleton injections (including args, kwargs, attributes and methods).

  • Add Callable.injections attribute that represents a tuple of all Callable injections (including args and kwargs).

  • Add optimization for Injection.value property that will compute type of injection once, instead of doing this on every call.

  • Add VERSION constant for verification of currently installed version.

  • Add support of Python 3.5.

  • Add support of six 1.10.0.

  • Add minor refactorings and code style fixes.


  • Change provider attributes scope to public.

  • Add Factory.injections attribute that represents a tuple of all Factory injections (including kwargs, attributes and methods).


  • Add minor documentation fixes.


  • Implement thread safety.


  • Add minor refactorings.


  • Add simplified syntax of kwarg injections for di.Factory and di.Singleton providers: di.Factory(SomeClass, dependency1=injectable_provider_or_value).

  • Add simplified syntax of kwarg injections for di.Callable provider: di.Callable(some_callable, dependency1=injectable_provider_or_value)

  • Add simplified syntax of kwarg injections for @di.inject decorator: @di.inject(dependency1=injectable_provider_or_value).

  • Optimize @di.inject() decorations when they were made several times for the same callback.

  • Add minor refactorings.

  • Fix of minor documentation issues.


  • Objects is renamed to Dependency Injector.


  • Fixing @inject import bug in examples.


  • Fixing minor bug in concept example.


  • Adding support of six from 1.7.0 to 1.9.0.

  • Factory / Singleton providers are free from restriction to operate with classes only. This feature gives a change to use factory method and functions with Factory / Singleton providers.

  • All attributes of all entities that have to be protected was renamed using _protected manner.

  • Providers extending was improved by implementing overriding logic in Provider.__call__() and moving providing logic into Provider._provide().

  • NewInstance provider was renamed to Factory provider. NewInstance still can be used, but it considered to be deprecated and will be removed in further releases.

  • @inject decorator was refactored to keep all injections in _injections attribute of decorated callback. It will give a possibility to track all the injections of particular callbacks and gives some performance boost due minimizing number of calls for doing injections.

  • A lot of documentation updates were made.

  • A lot of examples were added.

  • Some minor refactorings were done.

Previous versions

  • While Objects was in alpha state, changes were not tracked.