{ "info": { "author": "Andrew M. Hogan", "author_email": "drewthedruid@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "# borg_pod Python design pattern and module.\n\nThe Borg Pod pattern provides an easy method for creating dynamic and decoupled classes. Instead of imposing developer\noverhead of linking class implementations, designing a state machine, referring to the correct pointers for the owners\nof each attribute / method, and debugging the system - you could just put a wrapper above your classes and be done with\nit.\n\n## Get\n\nClone this repo, or use pip3 install borg_pod\n\n## Use\n\nAt the top of your module, be sure to include:\n\nfrom borg_pod import resist, assimilate, BorgPod\n\nOr, if you adhere to Google standards:\n\nimport borg_pod as bp_or_be_oil\n\nYou've imported borg_pod's relevant attributes directly like a sane person? Let's say you have some classes you want\nto be able to switch an instance between:\n\n class SomeClassA(object):\n\n def __init__(self):\n pass\n\n def my_method(self):\n print(\"I AM SOME CLASS A\")\n\n\n class OtherClassB(object):\n\n def __init__(self):\n print(\"HOLD ON, I AIN'T SO QUIET.\")\n\n def my_method(self):\n print(\"...where am I again?\")\n\n def a_unique_method(self, to_print):\n print(to_print)\n\n\nAll you would do is add the @assimilate decorator above both:\n\n\n @my_library.assimilate\n class SomeClassA\n ...\n\n\n @my_library.assimilate\n class OtherClassB\n\n ...\n\n\nCreating and converting an instance of one would look like:\n\n\nmy_first_unique = SomeClassA()\n\nmy_second_unique = SomeClassA()\n\nmy_third_unique = OtherClassB()\n\nassert my_first_unique is not my_second_unique and my_third_unique is not my_first_unique\n\nfirst_b = SomeClassB(my_first_unique)\n\nsecond_b = SomeClassB(my_second_unique)\n\nthird_b = SomeClassB(my_third_unique)\n\nassert (first_b is my_first_unique and second_b is my_second_unique and third_b is my_third_unique\n and first_b is not third_b and first_b is not second_b)\n\nAnd that's it! More advanced usage involves the @resist decorator, to avoid the self reference injection - but most\ndevs don't need to worry about that. You can find more thorough documentation inside of the module. Classes with\nthe @assimilate decorator can be subclassed and can be subclasses of other decorated or non-decorated classes.\n\n## Copyright\n\nborg_pod module by Andrew M. Hogan. (borg_pod © 2018 Hogan Consulting Group)\n\n## License\n\nLicensed under the Apache License.\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Andrew-Hogan/borg_pod", "keywords": "", "license": "LICENSE", "maintainer": "", "maintainer_email": "", "name": "borg_pod", "package_url": "https://pypi.org/project/borg_pod/", "platform": "any", "project_url": "https://pypi.org/project/borg_pod/", "project_urls": { "Homepage": "https://github.com/Andrew-Hogan/borg_pod" }, "release_url": "https://pypi.org/project/borg_pod/1.0.31/", "requires_dist": null, "requires_python": "", "summary": "A lightweight, decoupled wrapper for dynamic class assignment.", "version": "1.0.31" }, "last_serial": 4228201, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "49c6baea97d44e8f44bbe42c0ce908bf", "sha256": "d8db4c6f772b7bb3984552d32263da74a0b2132603146014570c749f84e83374" }, "downloads": -1, "filename": "borg_pod-1.0.0.tar.gz", "has_sig": false, "md5_digest": "49c6baea97d44e8f44bbe42c0ce908bf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13019, "upload_time": "2018-09-01T00:52:12", "url": "https://files.pythonhosted.org/packages/c4/4e/0f9eeaf62ae2bd002632ff5e4368b7f0f572edc44cbeeebed5f13ab18965/borg_pod-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "8ec738d91a1fd0455d911855222038b9", "sha256": "8b3ba0ef4901ced772d4d852e8aec8550cc5bf10536f80c3d35c2d3f8f38ac31" }, "downloads": -1, "filename": "borg_pod-1.0.1.tar.gz", "has_sig": false, "md5_digest": "8ec738d91a1fd0455d911855222038b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13183, "upload_time": "2018-09-01T00:59:17", "url": "https://files.pythonhosted.org/packages/05/78/d13ff73fd31e937024edc49ed72b67fcdf088090a8a52ca2694741fc4aa2/borg_pod-1.0.1.tar.gz" } ], "1.0.11": [ { "comment_text": "", "digests": { "md5": "49517a065f5f69acd7057e43652d22b5", "sha256": "e815adeff1715b39c72775cfed34cc34b85ad5a41ccb8250fec0890905815fc4" }, "downloads": -1, "filename": "borg_pod-1.0.11.tar.gz", "has_sig": false, "md5_digest": "49517a065f5f69acd7057e43652d22b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13182, "upload_time": "2018-09-01T01:07:50", "url": "https://files.pythonhosted.org/packages/60/17/e4a0fdd102248e59f295a9a1498927e6c9c3eb1bd99411c5da9a163eb808/borg_pod-1.0.11.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "cdcd3a455a1d9bc0eb3bc5e91f7154f0", "sha256": "ecf14d9fc527b24600aa65685d13d190a63627a88c97e5fc53ca69117d52ce34" }, "downloads": -1, "filename": "borg_pod-1.0.2.tar.gz", "has_sig": false, "md5_digest": "cdcd3a455a1d9bc0eb3bc5e91f7154f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13185, "upload_time": "2018-09-01T01:09:25", "url": "https://files.pythonhosted.org/packages/9f/62/2e20d27e630bddc223b7290d21048f686669473fd0259e672364b749a646/borg_pod-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "d23d085b6a140b00edc827a51fb5f10e", "sha256": "87776e33032e6701c4cdba745648371c5efefe1515ee4db91620d5a1c2227882" }, "downloads": -1, "filename": "borg_pod-1.0.3.tar.gz", "has_sig": false, "md5_digest": "d23d085b6a140b00edc827a51fb5f10e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13182, "upload_time": "2018-09-01T01:11:29", "url": "https://files.pythonhosted.org/packages/49/00/455e985e47ea42bc5cd926e26d0157cba914fa6af13c782276b7c2f5f554/borg_pod-1.0.3.tar.gz" } ], "1.0.31": [ { "comment_text": "", "digests": { "md5": "59f823b4c7557e4dc4eb3ff8e8fa06a9", "sha256": "0415b8aadea569fce24856b8428884ffc2f2c43b9c74cda2ba2d64e2c723513a" }, "downloads": -1, "filename": "borg_pod-1.0.31.tar.gz", "has_sig": false, "md5_digest": "59f823b4c7557e4dc4eb3ff8e8fa06a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13181, "upload_time": "2018-09-01T01:16:44", "url": "https://files.pythonhosted.org/packages/c5/09/3499f0c743ab612ab3e7131ce65f79d39cbf8fb092aee80ac8fc20d42b6e/borg_pod-1.0.31.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "59f823b4c7557e4dc4eb3ff8e8fa06a9", "sha256": "0415b8aadea569fce24856b8428884ffc2f2c43b9c74cda2ba2d64e2c723513a" }, "downloads": -1, "filename": "borg_pod-1.0.31.tar.gz", "has_sig": false, "md5_digest": "59f823b4c7557e4dc4eb3ff8e8fa06a9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13181, "upload_time": "2018-09-01T01:16:44", "url": "https://files.pythonhosted.org/packages/c5/09/3499f0c743ab612ab3e7131ce65f79d39cbf8fb092aee80ac8fc20d42b6e/borg_pod-1.0.31.tar.gz" } ] }