{ "info": { "author": "Bernardo Heynemann", "author_email": "heynemann@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved", "Natural Language :: English", "Programming Language :: Python :: 2.5" ], "description": "============\nIntroduction\n============\nThis is the groups page for PyoC. This group's purpose is to discuss new features in PyoC and to have an open channel between users and developers in the project.\n \nPyoC is an IoC container for Python. It's purpose is to make it even easier (it's easy already in Python) to manage dependencies between components. It's heavily oriented towards a Convention-over-Configuration approach.\n\n=================\nPyoC Architecture\n=================\n\nLets try to understand how PyoC works and what's the concept behind it.\n\nFirst let's look at a picture since it's more than a thousand words! :)\n\n.. image:: http://farm4.static.flickr.com/3528/3289725178_cd201f8e85.jpg?v=0\n\nIn the above diagram you can see two main aspects of PyoC. \n\nThe first one is the configuration, which is responsible for making sure the container understands your dependencies. As you can see in the picture you can use the ConfigurationFactory that's more convenient to you. PyoC ships with InPlaceConfig and FileConfig (as of version 0.1).\n\nThe second one is the dependencies resolution. The great thing about an IoC container is that it takes cares of boring infrastructure code for you, like instantiating classes, managing dependencies between them, etc. It also enables more advanced scenarios where you can hotswap one implementation for another without changing your code whatsoever.\n\nLet's take the given dependency diagram in the picture. It would translate roughly to this code::\n\n class A(object):\n def __init__(self, b, c, d):\n #assigns and does something\n\n class B(object):\n def __init__(self, e):\n #assigns and does something\n\n class C(object):\n def __init__(self, e):\n #assigns and does something\n\n class D(object):\n def __init__(self, f):\n #assigns and does something\n\n class E(object):\n def __init__(self, g):\n #assigns and does something\n\n class F(object):\n def __init__(self, h):\n #assigns and does something\n\n class G(object):\n def __init__(self, some_param):\n #assigns and does something\n\n class H(object):\n def __init__(self, some_param):\n #assigns and does something\n\nWow, that's a deep structure. Well, not quite. If you really dig into how components interact in your application you'll soon realize that this is a very simplistic representation. Nevertheless, let's create an instance of class A.\n\n``a = A(b, c, d)``\n\nHmm... Wait... We don't have b, c and d yet. Let's improve to create that::\n\n b = B(e)\n c = C(e)\n a = A(b, c, d)\n\nOps, we don't have e... You see where I'm going, right?\n\nHere is the full version of the code to get A::\n\n h = H(\"some message\")\n f = F(h)\n d = D(f)\n g = G(\"some message\")\n e = E(g)\n b = B(e)\n c = C(e)\n a = A(b, c, d)\n\nThat doesn't look good does it? What if you could do::\n\n a = IoC.resolve(A)\n\nThat's not magic my friend. That's PyoC. What you see above is the mechanism of dependency resolution working. PyoC can create the instances and fill their dependencies for you based on the configuration you do.\n\nWait? What? Oh, you are right! I never showed any configuration.\n\nLet's check an InPlaceConfig for the above scenario::\n\n config = InPlaceConfig()\n config.register(\"b\", B)\n config.register(\"c\", C)\n config.register(\"d\", D)\n config.register(\"e\", E)\n config.register(\"f\", F)\n config.register(\"g\", G)\n config.register(\"h\", H)\n\n\"You're kidding, right?\" \nNot really, my dear reader. That's pretty much it. As long as your classes use the property name specified in the first argument of the register function as the argument name in their constructors, you're good.\n\nI know that's quite a lot to digest. More is coming soon as blog posts / documentation. \n\n**The best place to look for examples right now is in the Test Cases that you can find in the source code.**\n\n===================\nProject Cheat Sheet\n===================\n\nProject Google Groups Page - http://groups.google.com/group/pythonioc\n\nProject Conventions: http://groups.google.com/group/pythonioc/web/conventions\n\nLinks and Blog Posts: http://groups.google.com/group/pythonioc/web/Links%20and%20Blog%20Posts\n\nProject JIRA (Issue and Version Management) - \nhttp://jira.stormwindproject.org:8080/browse/PYOC\n\nProject Subversion Server: http://svn.stormwindproject.org/svn/PyoC/Trunk/ (``svn \nco http://svn.stormwindproject.org/svn/PyoC/Trunk/ PyoC``)\n\n**PyPI Page**: http://pypi.python.org/pypi/PyoC/\n\n**Docs for current version**: -", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://www.pyoc.org", "keywords": "IoC Dependency Injection", "license": "OSI", "maintainer": null, "maintainer_email": null, "name": "PyoC", "package_url": "https://pypi.org/project/PyoC/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/PyoC/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://www.pyoc.org" }, "release_url": "https://pypi.org/project/PyoC/0.1.1dev/", "requires_dist": null, "requires_python": null, "summary": "PyoC is an IoC container for Python projects", "version": "0.1.1dev" }, "last_serial": 785437, "releases": { "0.1.1dev": [ { "comment_text": "", "digests": { "md5": "5f7bf1433777b8d25ded3c0c05c0dec3", "sha256": "a2eaf13855ea475c20905812603485e341acf30e75384371b0adaf1913ddca15" }, "downloads": -1, "filename": "PyoC-0.1.1dev.tar.gz", "has_sig": false, "md5_digest": "5f7bf1433777b8d25ded3c0c05c0dec3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18333, "upload_time": "2009-03-22T17:04:41", "url": "https://files.pythonhosted.org/packages/73/a9/55e23285ae8bef4a1890c325961ff2609322bef08d16736f04082d020f3d/PyoC-0.1.1dev.tar.gz" } ], "0.1dev": [ { "comment_text": "", "digests": { "md5": "1624d08f17b7d78fd3e2bd08ed79035a", "sha256": "9184c7e7acc643ccda060961c69d9666b24882702348f9ef1457aa061d492d1a" }, "downloads": -1, "filename": "PyoC-0.1dev.tar.gz", "has_sig": false, "md5_digest": "1624d08f17b7d78fd3e2bd08ed79035a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18321, "upload_time": "2009-03-22T17:03:50", "url": "https://files.pythonhosted.org/packages/f8/29/ad3afd0b00df146dec83c4e2ad5e0935b53efb10765f0ab1f0c8d3e485dd/PyoC-0.1dev.tar.gz" } ], "0.1dev-r894": [ { "comment_text": "", "digests": { "md5": "c5ea065b0f4cedf20a81fca7e10faf93", "sha256": "8c1bbf6846de035c4005c191191f401c9e57f12a227a379eea0686661f78bbaa" }, "downloads": -1, "filename": "PyoC-0.1dev-r894.zip", "has_sig": false, "md5_digest": "c5ea065b0f4cedf20a81fca7e10faf93", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8163, "upload_time": "2009-02-17T23:59:40", "url": "https://files.pythonhosted.org/packages/e1/84/430f7e792f0229eca1d63e3e0a91c879d936539e9ac82f3759a810d5e57e/PyoC-0.1dev-r894.zip" } ], "0.1dev-r895": [ { "comment_text": "", "digests": { "md5": "6b0051d0be1cb84900f242b9ed774bf8", "sha256": "ca92d180d377c75854649ce8b9826df295f9a13a4a7bd3c8cb1eb21ef11e6bd9" }, "downloads": -1, "filename": "PyoC-0.1dev-r895.zip", "has_sig": false, "md5_digest": "6b0051d0be1cb84900f242b9ed774bf8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8379, "upload_time": "2009-02-18T00:01:42", "url": "https://files.pythonhosted.org/packages/5a/67/a0964a847f93b1b02e1c2072fcb971b1fa0d67e98cbf963288f8ecbae4b6/PyoC-0.1dev-r895.zip" } ], "0.1dev-r896": [ { "comment_text": "", "digests": { "md5": "f2f34da672874a4741a3850c99bc5ce1", "sha256": "1dc4bedc66f77d650f78cf57c9f9568c4ff9429361d5ff41b56ccd8c0954b21e" }, "downloads": -1, "filename": "PyoC-0.1dev-r896.zip", "has_sig": false, "md5_digest": "f2f34da672874a4741a3850c99bc5ce1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8391, "upload_time": "2009-02-18T01:41:33", "url": "https://files.pythonhosted.org/packages/f0/9c/c3965226defb0b1bd8546ac667604beeceffab3592193fbf4a9cbac03ac9/PyoC-0.1dev-r896.zip" } ], "0.1dev-r898": [ { "comment_text": "", "digests": { "md5": "b7eda5f047c97af0a1e41d2e80b7a467", "sha256": "f141ceaa5fdc1bde7d081d79aa47458cc428299938d5764439932850c7ae8251" }, "downloads": -1, "filename": "PyoC-0.1dev-r898.zip", "has_sig": false, "md5_digest": "b7eda5f047c97af0a1e41d2e80b7a467", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16756, "upload_time": "2009-02-18T02:35:26", "url": "https://files.pythonhosted.org/packages/91/48/6b9dda3bf93845d1a6e2d4c8e12af11dcaa450a7ceb95f33a626e5f61cbb/PyoC-0.1dev-r898.zip" } ], "0.1dev-r907": [ { "comment_text": "", "digests": { "md5": "0300bed24a5c1a267e25105f7013198e", "sha256": "2158dc094f4fee6df64d6b2668d3f76d89475099fa85929f2cba91a8dec41ff6" }, "downloads": -1, "filename": "PyoC-0.1dev-r907.zip", "has_sig": false, "md5_digest": "0300bed24a5c1a267e25105f7013198e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21500, "upload_time": "2009-02-18T20:14:00", "url": "https://files.pythonhosted.org/packages/46/f5/a5d2e86ca59e349262fb99ee579ac59e4603282eeacd4fb87a14fa114685/PyoC-0.1dev-r907.zip" } ], "0.1dev-r908": [ { "comment_text": "", "digests": { "md5": "1602bb7bd807a16ceb9d764d91c7408e", "sha256": "fd4d70820bcca4aabc75dc7c6710dd9db159ed6deef0f0a53dc33885d3c496f6" }, "downloads": -1, "filename": "PyoC-0.1dev-r908.zip", "has_sig": false, "md5_digest": "1602bb7bd807a16ceb9d764d91c7408e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25825, "upload_time": "2009-02-18T20:20:19", "url": "https://files.pythonhosted.org/packages/12/8d/3fcadb5a0ab42a596174dfc669d05e532be0170265e9815b22bb7bae79d8/PyoC-0.1dev-r908.zip" } ], "0.1dev-r910": [ { "comment_text": "", "digests": { "md5": "e322dbd30105d850d30eb0cf468ba862", "sha256": "6a6c8a6caf7cadc49c2e70e5b955e29603b69589dc09c23c49161a929d61fe26" }, "downloads": -1, "filename": "PyoC-0.1dev-r910.zip", "has_sig": false, "md5_digest": "e322dbd30105d850d30eb0cf468ba862", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26393, "upload_time": "2009-02-19T01:00:11", "url": "https://files.pythonhosted.org/packages/9f/d7/a7d1a10d4c515ab9ab590484bd5515724846a4350d6f7a9f141e4aba5610/PyoC-0.1dev-r910.zip" } ], "0.1dev-r912": [ { "comment_text": "", "digests": { "md5": "4f0960c06c34a7a9cda52e138c917964", "sha256": "fcf933cb27a8902db0f1c833824395a19a5651b6a152cf112622e3e517848f49" }, "downloads": -1, "filename": "PyoC-0.1dev-r912.zip", "has_sig": false, "md5_digest": "4f0960c06c34a7a9cda52e138c917964", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26635, "upload_time": "2009-02-19T01:34:51", "url": "https://files.pythonhosted.org/packages/84/54/3cc5c2dea41c9fb027e6600fde10779c11b1012df436f5e8a629c834c1f2/PyoC-0.1dev-r912.zip" } ], "0.1dev-r913": [ { "comment_text": "", "digests": { "md5": "cbc458ce85a627472ab8bcb1278ae87b", "sha256": "bfeeb1d5b98377c77dd622d93c7987bf74bbbb885b7353d1060953c8784c1347" }, "downloads": -1, "filename": "PyoC-0.1dev-r913.zip", "has_sig": false, "md5_digest": "cbc458ce85a627472ab8bcb1278ae87b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 26665, "upload_time": "2009-02-19T01:44:02", "url": "https://files.pythonhosted.org/packages/03/e3/d09edfdbaf535d9c1793079ffb6c131b35c618400ec2938a042d77a9e547/PyoC-0.1dev-r913.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5f7bf1433777b8d25ded3c0c05c0dec3", "sha256": "a2eaf13855ea475c20905812603485e341acf30e75384371b0adaf1913ddca15" }, "downloads": -1, "filename": "PyoC-0.1.1dev.tar.gz", "has_sig": false, "md5_digest": "5f7bf1433777b8d25ded3c0c05c0dec3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18333, "upload_time": "2009-03-22T17:04:41", "url": "https://files.pythonhosted.org/packages/73/a9/55e23285ae8bef4a1890c325961ff2609322bef08d16736f04082d020f3d/PyoC-0.1.1dev.tar.gz" } ] }