{ "info": { "author": "Julien Tellier", "author_email": "julien.pascal.tellier@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Py3njection\n===========\n\n.. image:: https://travis-ci.org/Aigrefin/py3njection.svg\n :target: https://travis-ci.org/Aigrefin/py3njection\n :alt: Build Status\n\n.. image:: https://codecov.io/github/Aigrefin/py3njection/coverage.svg?branch=master\n :target: https://codecov.io/github/Aigrefin/py3njection?branch=master\n :alt: Tests status\n\n.. image:: https://readthedocs.org/projects/py3njection/badge/?version=latest\n :target: http://py3njection.readthedocs.org/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://badges.gitter.im/Join%20Chat.svg\n :target: https://gitter.im/Aigrefin/py3njection?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n :alt: Join the chat at https://gitter.im/Aigrefin/py3njection\n\nHow to use\n----------\n\n.. code-block:: python\n\n from py3njection import inject\n from some_package import ClassToInject\n\n class Demo:\n @inject\n def __init__(self, object_to_use: ClassToInject):\n self.dependency = object_to_use\n\n demo = Demo()\n\nHow does it work ?\n------------------\n\nThe decorator *@inject* looks for any annotated method/function parameters (*return* annotation excluded).\n\nIt creates a **new** object from the specified class **if no** object is already provided.\n\nWhat if I want a singleton ?\n----------------------------\n\n.. code-block:: python\n\n @singleton\n class ClassToInject:\n pass\n\nThat's it ! When *@inject* sees a class with this decorator, it **always** uses the **same** instance.\n\nHow to install\n--------------\n\nIt's available on PyPI !\n\n.. code-block:: bash\n\n pip install py3injection\n\nOr get it at : https://pypi.python.org/pypi/py3njection\n\nWant to know more ?\n-------------------\n\nA more complete documentation is available here : http://py3njection.readthedocs.org/en/latest/\n\nContact and Contribution\n------------------------\n\nFeel free to contribute in any way :\n\n- help, bugs, issues, suggestions : https://github.com/Aigrefin/py3njection/issues\n- twitter account : https://twitter.com/Julien_Tellier\n- and finally my mail address is in the setup.py\n\nSome Notes\n----------\n\n- Unit tests come easy to set up (unless you have too many dependencies, but that would be a code smell, right ?). Just specify mock instances at your object creation. Examples will come later.\n- This also means the injected object could also have some of its members injected too at their initialization !", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/Aigrefin/py3njection/tarball/1.4", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Aigrefin/py3njection", "keywords": "dependency,injection,annotation,inject,di,dependency injection,dependency injector,dependency management,ioc,inversion of control", "license": "BSD New", "maintainer": null, "maintainer_email": null, "name": "py3njection", "package_url": "https://pypi.org/project/py3njection/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/py3njection/", "project_urls": { "Download": "https://github.com/Aigrefin/py3njection/tarball/1.4", "Homepage": "https://github.com/Aigrefin/py3njection" }, "release_url": "https://pypi.org/project/py3njection/1.4.1/", "requires_dist": null, "requires_python": null, "summary": "A simple dependency injection module using python 3 annotations", "version": "1.4.1" }, "last_serial": 2177407, "releases": { "1.0": [], "1.1": [ { "comment_text": "", "digests": { "md5": "3b27aa4c54ea51bd8fed1fb37e9e76b7", "sha256": "7a6d4b2e83c906c8a1499f3531004fe2360182a7d0c2f2db6e27b689b1007bfa" }, "downloads": -1, "filename": "py3njection-1.1.tar.gz", "has_sig": true, "md5_digest": "3b27aa4c54ea51bd8fed1fb37e9e76b7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1954, "upload_time": "2015-12-12T08:00:52", "url": "https://files.pythonhosted.org/packages/79/de/b1dd73121dcd37a2328f59d04e15caf063eda05a441b841cf1f489ce9854/py3njection-1.1.tar.gz" } ], "1.2": [ { "comment_text": "", "digests": { "md5": "5dda3dd114918260f78c588cf0570fc1", "sha256": "eae1bc0482998902b8fee9422e0b1a029cebcd20642443aac28aeff0e928e77c" }, "downloads": -1, "filename": "py3njection-1.2.tar.gz", "has_sig": true, "md5_digest": "5dda3dd114918260f78c588cf0570fc1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1990, "upload_time": "2015-12-12T08:04:49", "url": "https://files.pythonhosted.org/packages/56/6b/0a2a87f5aeadcac9bb8c7b748aad0ab795957178111e7bf97c5a75b45ad3/py3njection-1.2.tar.gz" } ], "1.3": [ { "comment_text": "", "digests": { "md5": "724284b9c5f7f6c5cdaeda2d356801e8", "sha256": "0a28cd4f5eb6241d27b643e290edf8f3f5b9a6122d15592d77b7bc07122c61a8" }, "downloads": -1, "filename": "py3njection-1.3.tar.gz", "has_sig": true, "md5_digest": "724284b9c5f7f6c5cdaeda2d356801e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2419, "upload_time": "2015-12-13T12:37:53", "url": "https://files.pythonhosted.org/packages/c9/7b/4a4fbcc2a2f631011ab11fbccace954988a907ef8f853e0aa0c59c926544/py3njection-1.3.tar.gz" } ], "1.4": [ { "comment_text": "", "digests": { "md5": "6b48fb6533870c5a7c614a0851d19c66", "sha256": "688f6467a9bc146a4a5bfc8af5196e72369db600da6c8eca4b4c4749e296063e" }, "downloads": -1, "filename": "py3njection-1.4.tar.gz", "has_sig": true, "md5_digest": "6b48fb6533870c5a7c614a0851d19c66", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3109, "upload_time": "2015-12-16T23:39:44", "url": "https://files.pythonhosted.org/packages/b3/19/621d379e391abf0f0cbf206f0e478ec6475649bce55272b756f24f0ba847/py3njection-1.4.tar.gz" } ], "1.4.1": [ { "comment_text": "", "digests": { "md5": "caa385426a6945f341645bf6125b3dfa", "sha256": "7dd1a0612ebdd9b6417419b68635de6cfa368c01c45f7a9a60f656b9d0307bc5" }, "downloads": -1, "filename": "py3njection-1.4.1.tar.gz", "has_sig": false, "md5_digest": "caa385426a6945f341645bf6125b3dfa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3115, "upload_time": "2016-06-20T15:26:26", "url": "https://files.pythonhosted.org/packages/f8/53/f5aca6d3ad581fb784f952f335735bf2990a7ab27a28859e9274bcc59f4f/py3njection-1.4.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "caa385426a6945f341645bf6125b3dfa", "sha256": "7dd1a0612ebdd9b6417419b68635de6cfa368c01c45f7a9a60f656b9d0307bc5" }, "downloads": -1, "filename": "py3njection-1.4.1.tar.gz", "has_sig": false, "md5_digest": "caa385426a6945f341645bf6125b3dfa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3115, "upload_time": "2016-06-20T15:26:26", "url": "https://files.pythonhosted.org/packages/f8/53/f5aca6d3ad581fb784f952f335735bf2990a7ab27a28859e9274bcc59f4f/py3njection-1.4.1.tar.gz" } ] }