Python dependency injection framework, inspired by Guice

Edit Package python-injector
https://github.com/alecthomas/injector

Dependency injection as a formal pattern is less useful in Python than
in other languages, primarily due to its support for keyword
arguments, the ease with which objects can be mocked, and its dynamic
nature.

That said, a framework for assisting in this process can remove a lot
of boiler-plate from larger applications. That's where Injector can
help. It automatically and transitively provides keyword arguments
with their values. As an added benefit, Injector encourages nicely
compartmentalised code through the use of Module s.

While being inspired by Guice, it does not slavishly replicate its
API. Providing a Pythonic API trumps faithfulness.

Refresh
Refresh
Source Files
Filename Size Changed
0.19.0.tar.gz 0000044208 43.2 KB
python-injector.changes 0000003787 3.7 KB
python-injector.spec 0000002499 2.44 KB
Revision 7 (latest revision is 10)
Dominique Leuenberger's avatar Dominique Leuenberger (dimstar_suse) accepted request 943322 from Matej Cepl's avatar Matej Cepl (mcepl) (revision 7)
- Update to 0.19.0:
  - Added the license to the source distribution, thanks to
    Joshua Adelman
  - Added Python 3.9 and 3.10 support, this includes fixing
    Python 3.10 compatibility, thanks to Torge Matthies
  - Improved the documentation, thanks to Takahiro Kojima
  - Improved the source distribution so that it can be used to
    build and install wheels, thanks to Janusz Skonieczny
  - Added requirements files for easier development, thanks to
    Greg Eremeev
  - Removed Python 3.5 support
  - Fixed a bug where only one of multiple NoInject annotations
    was interpreted
Comments 0
openSUSE Build Service is sponsored by