Aglyph — Dependency Injection for Python


Aglyph is a Dependency Injection framework for Python 2.6+, supporting type 2 (setter) and type 3 (constructor) injection.

Aglyph runs on CPython 2.6 - 3.3, and on recent versions of the PyPy, Jython, IronPython, and Stackless Python variants. See Aglyph 2.0.0 testing summary for a complete list of the Python versions and variants on which Aglyph has been tested.

Aglyph can assemble prototype components (a new instance is created every time), singleton components (the same instance is returned every time), and borg components (a new instance is created every time, but all instances of the same class share the same internal state).

Aglyph can be configured using a declarative XML syntax, or programmatically in pure Python.

Aglyph is not a “full stack;” only dependency injection support is provided.

Aglyph versioning

Aglyph follows the Semantic Versioning Specification (SemVer).

The Aglyph version is always defined as the __version__ member of the aglyph/ module:

>>> import aglyph
>>> aglyph.__version__

The Aglyph context DTD includes the Aglyph version in the filename and in a header comment.

Changed in version 2.0.0: The Aglyph DTD version is now kept in sync with every release version, whether or not the DTD itself was changed.

Indices and tables