Aglyph - Dependency Injection for Python
http://ninthtest.info/aglyph-python-dependency-injection/
Introduction
Aglyph is a Dependency Injection framework for Python that...
- supports type 2 (setter) and type 3 (constructor) dependency injection
- can assemble prototype, singleton, borg, and weakref components
- supports templates (i.e. component inheritance) and lifecycle methods
- works with any kind of object creation pattern you'll encounter:
- constructor
- factory function or method
- object creation hidden behind attribute or property access
- is configured declaratively, either programmatically through a fluent API or using a simple XML syntax (see the Aglyph DTD)
- is non-intrusive:
- only one dependency (Autologging) beyond the Python standard library
- does not require modification of existing source code (i.e. no decorators, specific naming conventions, or any other kind of syntactic "magic" necessary)
- can inject not only 3rd-party dependencies, but also dependents
- runs on Python 2.7 and 3.4+ using the same codebase
- is proactively tested on CPython, Jython, IronPython, PyPy, and Stackless Python
- is fully logged and traced for ease of troubleshooting (note: tracing is disabled by default, and can be activated by setting an environment variable)
Installation
The easiest way to install Aglyph is to use pip:
$ pip install Aglyph
To verify that an installation was successful:
>>> import aglyph
>>> aglyph.__version__
'3.0.0.post1'
After installing, take a look at Getting started with Aglyph and the Aglyph cookbook.
Alternative source and binary installation options are described below.
Source installation
Clone or fork the repository:
$ git clone https://github.com/mzipay/Aglyph.git
Alternatively, download and extract a source .zip or .tar.gz archive from https://github.com/mzipay/Aglyph/releases, https://pypi.python.org/pypi/Aglyph/ or https://sourceforge.net/projects/aglyph/files/aglyph/.
Run the test suite and install the aglyph package:
$ cd Aglyph
$ python setup.py test
$ python setup.py install
Binary installation
Download the Python wheel (.whl) or .exe/.msi Windows installer from https://pypi.python.org/pypi/Aglyph/ or https://sourceforge.net/projects/aglyph/files/aglyph/.
Use pip or wheel to install the .whl, or run the Windows installer.
Metadata
Release files for Aglyph 3.0.0.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| Aglyph-3.0.0.post1.zip | 529.4 kB | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Aglyph-3.0.0.post1.win-amd64.exe | Details | |||
| Aglyph-3.0.0.post1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 1.2 MB
Release files / Aglyph-3.0.0.post1.zip
| Download URL | Aglyph-3.0.0.post1.zip |
|---|---|
| Size | 529.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
123dfc735f7ff5d7c2e6e5dfc3f6d40534aa32897a9529c9f51d5484453eb4f4
|
|
BLAKE2b-256 checksum How to use checksums |
b21156e5523709a0d86a6ba903f957cadf232342a0219795069a3df500b78721
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0
|
Release files / Aglyph-3.0.0.post1.win-amd64.exe
| Download URL | Aglyph-3.0.0.post1.win-amd64.exe |
|---|---|
| Size | 637.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
562bdb0702de4a5d9d08686b308e7ec4fa61970f85e0631c10655cf001b90ad6
|
|
BLAKE2b-256 checksum How to use checksums |
2c606d4028341121d2b3e0d3a5711fafd2a5f7f5a99ad191b8d2eb70eff39a28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0
|
Release files / Aglyph-3.0.0.post1-py2.py3-none-any.whl
| Download URL | Aglyph-3.0.0.post1-py2.py3-none-any.whl |
|---|---|
| Size | 44.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
98284ac69ad6bd1ec7725dae44a210447c209a1c5c3fa6510693d6d23dab4491
|
|
BLAKE2b-256 checksum How to use checksums |
523a2cef73bc336cfc4ba644a0a53f00589e5c43531734928de06da1c2526ccc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0
|