Contents

dependency-injector 4.48.3

0

Dependency injection framework for Python

Dependency injection framework for Python

Stars: 4800, Watchers: 4800, Forks: 343, Open Issues: 213

The ets-labs/python-dependency-injector repo was created 11 years ago and the last code push was 2 weeks ago.
The project is very popular with an impressive 4800 github stars!

How to Install dependency-injector

You can install dependency-injector using pip

pip install dependency-injector

or add it to a project with poetry

poetry add dependency-injector

Package Details

Author
None
License
Copyright (c) 2024, Roman Mogylatov All rights reserved.
    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions are met:
    
    * Redistributions of source code must retain the above copyright notice, this
      list of conditions and the following disclaimer.
    
    * Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
    
    * Neither the name of "Dependency Injector" nor the names of its
      contributors may be used to endorse or promote products derived from
      this software without specific prior written permission.
    
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
    FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
    DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
    SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
    CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
    OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    </dd>
Homepage
None
PyPi:
https://pypi.org/project/dependency-injector/
Documentation:
https://python-dependency-injector.ets-labs.org/
GitHub Repo:
https://github.com/ets-labs/python-dependency-injector

Classifiers

  • Software Development
  • Software Development/Libraries
  • Software Development/Libraries/Python Modules
No  dependency-injector  pypi packages just yet.

Errors

A list of common dependency-injector errors.

Code Examples

Here are some dependency-injector code examples and snippets.

GitHub Issues

The dependency-injector package has 213 open issues on GitHub

  • Aggregate providers must use the .provider attribute for injection Markers
  • Bug: Wrong cls type in combination of @classmethod and @inject
  • Configuration provider passed as object instead of resolved value in provider injection
  • Retrofit assert type for some type-stub checks
  • Nested dependencies container dependency injection working unexpected
  • Add context local resource
  • Single Database Session Per FastAPI Request Lifecycle
  • Problematic work with Configuration provider and it's inconsistent behavior and interface

See more issues on GitHub

Related Packages & Articles

aiojobs 1.4.0

Job scheduler for managing background tasks (asyncio)