{ "info": { "author": "Avik Samaddar", "author_email": "eml2avik@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "# ObjectProxy #\n**A minimalistic yet powerful object proxying utility**\n\nThis readme attempts to explain the general use of this library.\n\n### Installation ###\n* Install from repository\n```\npip install git+https://github.com/aviksama/objectproxy.git\n```\n* Install from pypi\n```\npip install object-proxy\n```\n### Example ###\n\nObject proxy basically creates a proxy for any python object:\n\n```python\nclass MyClass(object):\n\n def __init__(self, array=None):\n self.array = array or []\n\n def get_array_element(self, index):\n try:\n return self.array[index]\n except IndexError:\n return\n\n\ndef create_dictionary_of_objects(*args):\n mydict = dict()\n for index, arg in enumerate(args):\n mydict[index] = arg\n\n```\nNow lets create proxies for the objects above in random fashion\n\n```python\n>>> from objectproxy import ProxyElement, eval_proxy\n\n>>> class_proxy = ProxyElement(MyClass, args=[[1,2,3],], kwargs={})\n>>> function_proxy = ProxyElement(create_dictionary_of_objects, args=[class_proxy], kwargs={})\n>>> class_proxy_ref = function_proxy.values()[0]\n>>> class_proxy_array_element = class_proxy_ref.get_array_element(0)\n>>> eval_proxy(class_proxy_array_element)\n1\n``` \nuntil `eval_proxy` is called on the proxy object, It doesn't call the parent methods. Hence all the parent methods and attributes are lazily evaluated. \n\n### Contribution guidelines ###\n\nWe appreciate your effort in contributing to this project. You can contribute in any of the following.\n* Writing tests\n* Code review\n* Other guidelines\n* Submit issues\n\nIn order to contribute please fork the repository, And make a GitHub pull request to `dev` branch.\n\n### Who do I talk to? ###\n\n* Repo owner or admin\n* Other community or team contact\n\n\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/aviksama/objectproxy", "keywords": "python objectproxy", "license": "", "maintainer": "", "maintainer_email": "", "name": "object-proxy", "package_url": "https://pypi.org/project/object-proxy/", "platform": "", "project_url": "https://pypi.org/project/object-proxy/", "project_urls": { "Homepage": "https://github.com/aviksama/objectproxy" }, "release_url": "https://pypi.org/project/object-proxy/0.1a1/", "requires_dist": null, "requires_python": "", "summary": "A minimalistic yet powerful object proxying utility", "version": "0.1a1" }, "last_serial": 4625601, "releases": { "0.1a0": [ { "comment_text": "", "digests": { "md5": "0229ed5bd431f91776f9117188769002", "sha256": "55f7500b0b02afc17c06852c954b5ee9b43aa4d141402f6ed8cc36ddfc122494" }, "downloads": -1, "filename": "object_proxy-0.1a0-py3-none-any.whl", "has_sig": false, "md5_digest": "0229ed5bd431f91776f9117188769002", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3827, "upload_time": "2018-12-21T15:46:03", "url": "https://files.pythonhosted.org/packages/d5/89/8141c5b9e693c03fd92fff12eba964c4ee83a04bcf23691a455ca20d94d1/object_proxy-0.1a0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6c484f8f40ab804d8723f0978bea3d62", "sha256": "6c1547182df508d4bf3ec141506224ffbc98dc3ee875dba3815d0d61ee3743b8" }, "downloads": -1, "filename": "object-proxy-0.1a0.tar.gz", "has_sig": false, "md5_digest": "6c484f8f40ab804d8723f0978bea3d62", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2729, "upload_time": "2018-12-21T15:46:05", "url": "https://files.pythonhosted.org/packages/a8/df/b78e279ac5b2e7256c368cf771e0c16f802719294eef3c99eb24aa0bb23d/object-proxy-0.1a0.tar.gz" } ], "0.1a1": [ { "comment_text": "", "digests": { "md5": "d7879ed482138af3f7239e2b195ce5ae", "sha256": "6e30ca453f3ce7f17135b988f86507aa6a2b6249e22e8825f25cbef11411bacf" }, "downloads": -1, "filename": "object_proxy-0.1a1-py3-none-any.whl", "has_sig": false, "md5_digest": "d7879ed482138af3f7239e2b195ce5ae", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3841, "upload_time": "2018-12-21T16:03:02", "url": "https://files.pythonhosted.org/packages/46/65/a80602070365ba1ea8d0c8156791bee039ffe11f99f674791da8334ce443/object_proxy-0.1a1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c073996e8f06b4ed56c8e148d98d6e45", "sha256": "bfc49f465065fccbea05fcd4e0f63657b4a9c772ab1a48033da013e2311c3b42" }, "downloads": -1, "filename": "object-proxy-0.1a1.tar.gz", "has_sig": false, "md5_digest": "c073996e8f06b4ed56c8e148d98d6e45", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2745, "upload_time": "2018-12-21T16:03:03", "url": "https://files.pythonhosted.org/packages/9d/e2/4cbe5f5d6ada6db695dc4d3c07ba0b3a8435fff080c8444df6c573fcbaf5/object-proxy-0.1a1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d7879ed482138af3f7239e2b195ce5ae", "sha256": "6e30ca453f3ce7f17135b988f86507aa6a2b6249e22e8825f25cbef11411bacf" }, "downloads": -1, "filename": "object_proxy-0.1a1-py3-none-any.whl", "has_sig": false, "md5_digest": "d7879ed482138af3f7239e2b195ce5ae", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 3841, "upload_time": "2018-12-21T16:03:02", "url": "https://files.pythonhosted.org/packages/46/65/a80602070365ba1ea8d0c8156791bee039ffe11f99f674791da8334ce443/object_proxy-0.1a1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c073996e8f06b4ed56c8e148d98d6e45", "sha256": "bfc49f465065fccbea05fcd4e0f63657b4a9c772ab1a48033da013e2311c3b42" }, "downloads": -1, "filename": "object-proxy-0.1a1.tar.gz", "has_sig": false, "md5_digest": "c073996e8f06b4ed56c8e148d98d6e45", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2745, "upload_time": "2018-12-21T16:03:03", "url": "https://files.pythonhosted.org/packages/9d/e2/4cbe5f5d6ada6db695dc4d3c07ba0b3a8435fff080c8444df6c573fcbaf5/object-proxy-0.1a1.tar.gz" } ] }