Inject

Software Screenshot:
Inject
Software Details:
Version: 3.3.1
Upload Date: 12 Apr 15
Developer: Ivan Korobkov
Distribution Type: Freeware
Downloads: 117

Rating: 2.0/5 (Total Votes: 1)

It uses descriptors and decorators to reference external dependencies, and scopes to specify how to reuse objects.

Dependencies can be referenced by types and optional annotations.

No configuration is required, but advanced in-code configuration is possible.

Most other python dependency injection tools, such as PyContainer or Spring Python, are ports from other languages (Java). So they are based on dependency injection ways specific for statically typed languages.

Python is not Java, and so patterns and programming techniques, which seem proper and usable in one language, can be awkward in another.

Inject has been created to provide a pythonic way of dependency injection, utilizing specific Python functionality.

Terminology used in inject has been intentionally made similar to Guice, however the internal architecture is different.

Features:

  • Fast, only 2-3 times slower that direct instantiation.
  • Normal way of instantiating objects, Class(*args, **kwargs).
  • Injecting arguments into functions and methods.
  • Referencing dependencies by types and optional annotations.
  • Binding to callables, instances and unbound methods (see [nvokers).
  • Request scope middleware for WSGI and Django applications (requires Python2.5+).
  • No configuration required at all.
  • Advanced flexible configuration possible
  • Two injection methods, a descriptor and a decorator
  • Support for inheritance by passing inject.super as the default kwarg value
  • Invokers to call unbound methods (cool for listeners)
  • Partial injections, when only some arguments are injected:
  • Scopes: application (singleton), request, noscope
  • Easy integration into existing projects.

What is new in this release:

  • Removed intelliJ idea files.

Similar Software

TypeScript
TypeScript

2 Oct 16

EvoSynth
EvoSynth

12 May 15

Apache Avro
Apache Avro

10 Apr 16

pyquery
pyquery

13 Apr 15

Comments to Inject

Comments not found
Add Comment
Turn on images!