{ "info": { "author": "Viktorov A.G.", "author_email": "andvikt@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "## Install\n\n```bash\npip3 install aioproperty\n```\n\n## Documentation\n\nYou can find documentation [here](http://aioproperty.readthedocs.io)\n\n\n## Description\n\naioproperty presents async properties with both async getter and setter in one place.\n\n#### Example:\n```python\nfrom aioproperty import aioproperty\nimport asyncio\n\nclass SomeClass:\n \n @aioproperty\n async def hello(self, value):\n await asyncio.sleep(1)\n return value\n\nsome_obj = SomeClass()\nsome_obj.hello = 'hello'\n\nasync def run():\n print(await some_obj.hello)\n\nasyncio.run(run())\n```\n\naioproperty is not a property in a classic meaning, it keeps values inside asincio tasks. Once\nyou set a new value, it is scheduled in a task. If any task is running now, it will wait untill it is finished.\nWhen you get value, you actually get a current task, and you can await it to get a value.\nMore of that: you can use math without awaiting like that:\n\n```python\nother = some_obj.hello + ' byby'\nprint(await other)\n```\n\nWe also introduce chaining:\n\n```python\nclass SomeClass:\n \n @aioproperty\n async def hello(self, value):\n await asyncio.sleep(1)\n return value\n \n @hello.chain\n async def some_more(self, value):\n push_value(value)\n```\n\nChains works like a reducer. It applies each function to a new value iteratively. It can return value or return nothing.\nIf nothing is return, the value will be kept asis. Any `chained` function is inserted by default in the end of chain, but\nyou can control it with a priority parameter, or with is_first parameter. If is_first is True, it will be inserted in the\nbeginning of the chain.\n\nYou can also use inheritance and modify inhereted properties with our special decorator `inject`:\n\n```python\nclass Parent:\n \n @aioproperty\n async def hello(self, value):\n await asyncio.sleep(1)\n return value\n \n @hello.chain\n async def some_more(self, value):\n push_value(value)\n\nclass Child(Parent):\n \n @inject(Parent.hello, priority=100)\n async def injected_method(self, value):\n print('hello from injection')\n \n #another form of injection using name of a property\n @inject('hello')\n async def injected_method_2(self, value):\n print('hello from injection 2')\n```\n\nRead more in our [docs](http://aioproperty.readthedocs.io)", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "aioproperty", "package_url": "https://pypi.org/project/aioproperty/", "platform": "", "project_url": "https://pypi.org/project/aioproperty/", "project_urls": null, "release_url": "https://pypi.org/project/aioproperty/0.3.2/", "requires_dist": null, "requires_python": ">=3.7", "summary": "truely async properties", "version": "0.3.2", "yanked": false, "yanked_reason": null }, "last_serial": 6042694, "releases": { "0.1.3": [ { "comment_text": "", "digests": { "md5": "f492976f0619b0419610de6c470dc93f", "sha256": "91caebe5d4754454e25950c2caf3926fda04395a1e210af35c073febb7499f79" }, "downloads": -1, "filename": "aioproperty-0.1.3.tar.gz", "has_sig": false, "md5_digest": "f492976f0619b0419610de6c470dc93f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 10041, "upload_time": "2019-10-21T16:50:44", "upload_time_iso_8601": "2019-10-21T16:50:44.487003Z", "url": "https://files.pythonhosted.org/packages/dc/81/4dd4216285ce6993f700d25b470da9d510be4ea8a61331f498dbc77d31f3/aioproperty-0.1.3.tar.gz", "yanked": false, "yanked_reason": null } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "e22fb420066e18a7341c4ffd90a8f57c", "sha256": "00e28eaa4a3d1c2537df21f672ea9152fe710cf70f16038ebf30909869dc065f" }, "downloads": -1, "filename": "aioproperty-0.1.4.tar.gz", "has_sig": false, "md5_digest": "e22fb420066e18a7341c4ffd90a8f57c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 10038, "upload_time": "2019-10-21T17:12:57", "upload_time_iso_8601": "2019-10-21T17:12:57.626784Z", "url": "https://files.pythonhosted.org/packages/3a/75/db6307148c2cb1423c37fcc43b845755e73379cf915f1953d970cbe471b1/aioproperty-0.1.4.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "fc1681dbfa4127722428866ffdb74185", "sha256": "b9da227a77037e4ff42e092043492c4f4a0fb57a84b6bcc0a943eeb58ee91820" }, "downloads": -1, "filename": "aioproperty-0.2.0.tar.gz", "has_sig": false, "md5_digest": "fc1681dbfa4127722428866ffdb74185", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 10511, "upload_time": "2019-10-21T18:42:51", "upload_time_iso_8601": "2019-10-21T18:42:51.913814Z", "url": "https://files.pythonhosted.org/packages/f8/2f/819664725bc078f900fcdcd7e7adba20cfabefd9bc4bec695a89828ea170/aioproperty-0.2.0.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "ba3ef18f618396435532b5488bce4002", "sha256": "677f3546e7e96f5438bafe969ea4f22116cbd85ff7786defd6d889c0ead888d3" }, "downloads": -1, "filename": "aioproperty-0.2.1.tar.gz", "has_sig": false, "md5_digest": "ba3ef18f618396435532b5488bce4002", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 10644, "upload_time": "2019-10-22T07:11:17", "upload_time_iso_8601": "2019-10-22T07:11:17.642780Z", "url": "https://files.pythonhosted.org/packages/8e/7d/d908d6aea84ff0bd0dedd7d1ff38b3490104a81d61d4d065078758675b63/aioproperty-0.2.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "88c8d286d1977249275fa98ed802625a", "sha256": "84a48e0051229a44d16d9af270a3d471211983799aca5c4547b6b6ee1716fc6c" }, "downloads": -1, "filename": "aioproperty-0.2.2.tar.gz", "has_sig": false, "md5_digest": "88c8d286d1977249275fa98ed802625a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 10643, "upload_time": "2019-10-22T07:13:39", "upload_time_iso_8601": "2019-10-22T07:13:39.370780Z", "url": "https://files.pythonhosted.org/packages/73/40/71504942b577e844926b9643cc9ce26abb28748251e0e933a8ba40b01fe4/aioproperty-0.2.2.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "11514cd7335c89e155f49abc93f3ba06", "sha256": "c971e2b55b2557812db8ed72f783dc510ad81c29bc23d911d3aba98c097ea26d" }, "downloads": -1, "filename": "aioproperty-0.2.3.tar.gz", "has_sig": false, "md5_digest": "11514cd7335c89e155f49abc93f3ba06", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 10658, "upload_time": "2019-10-22T07:31:56", "upload_time_iso_8601": "2019-10-22T07:31:56.250572Z", "url": "https://files.pythonhosted.org/packages/1b/78/5675f0ba7b0c9506d951a8f6387ce42eb84e8f290702bedc0af8d9bcdc0c/aioproperty-0.2.3.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "2599b0a4b3c0979de680b519a2447487", "sha256": "c92dc80db77bb402dcedff43fbab45bcaa2a813550002ece515d5f5ff13b6047" }, "downloads": -1, "filename": "aioproperty-0.2.4.tar.gz", "has_sig": false, "md5_digest": "2599b0a4b3c0979de680b519a2447487", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 10680, "upload_time": "2019-10-22T08:07:40", "upload_time_iso_8601": "2019-10-22T08:07:40.318780Z", "url": "https://files.pythonhosted.org/packages/d4/cb/bba8af69691bc26cb9056d5ef36b476f3f346f16eace2db88339bd2256d3/aioproperty-0.2.4.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "c4c9e7c074c8977fbc5d78fe9cbb2f23", "sha256": "c7a5d6867e4b6971a9e5f1e440b3d9f69803afd4b84f4e5195f7e1afcba210d1" }, "downloads": -1, "filename": "aioproperty-0.2.5.tar.gz", "has_sig": false, "md5_digest": "c4c9e7c074c8977fbc5d78fe9cbb2f23", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 10794, "upload_time": "2019-10-22T08:41:17", "upload_time_iso_8601": "2019-10-22T08:41:17.426135Z", "url": "https://files.pythonhosted.org/packages/d1/eb/8e45d254c9d65068a16af086de564055c03d98ceaebe624fba2e02960537/aioproperty-0.2.5.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "fb8be666fcffad53dc3d10868bcbfd7a", "sha256": "a631b4dedde76a7c0bee70daf068b4db5b7cbd1d3f86c6e09149c2ca033740b1" }, "downloads": -1, "filename": "aioproperty-0.2.6.tar.gz", "has_sig": false, "md5_digest": "fb8be666fcffad53dc3d10868bcbfd7a", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 11029, "upload_time": "2019-10-22T18:19:33", "upload_time_iso_8601": "2019-10-22T18:19:33.841835Z", "url": "https://files.pythonhosted.org/packages/32/dc/5e407e7d0abd67855219fdb7bdc975b011553bdb162724989117aca35e9b/aioproperty-0.2.6.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.7": [ { "comment_text": "", "digests": { "md5": "a4c8a6e5f612088bd71d982be17702ef", "sha256": "7a236703e7b5993cf34df3acfddb312f7555b93334da0c2fa6527d2e3c9d619d" }, "downloads": -1, "filename": "aioproperty-0.2.7.tar.gz", "has_sig": false, "md5_digest": "a4c8a6e5f612088bd71d982be17702ef", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 11059, "upload_time": "2019-10-23T06:43:58", "upload_time_iso_8601": "2019-10-23T06:43:58.222784Z", "url": "https://files.pythonhosted.org/packages/7d/4b/33edbc38777e34888296e2ccb2d4bdc20d7cf16ef8a7adf824c0f1ebe8ee/aioproperty-0.2.7.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.8": [ { "comment_text": "", "digests": { "md5": "c60c16d33150bd64a812c002738aecf5", "sha256": "c21f78e69b6922fc703961e9744915b9c2e2733d0e4a1408d783c577383caf53" }, "downloads": -1, "filename": "aioproperty-0.2.8.tar.gz", "has_sig": false, "md5_digest": "c60c16d33150bd64a812c002738aecf5", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 11160, "upload_time": "2019-10-23T07:22:56", "upload_time_iso_8601": "2019-10-23T07:22:56.450424Z", "url": "https://files.pythonhosted.org/packages/72/34/fa411fb6eca6ec331c843399f58c701b74bb4c1c906a7ff7f3a4dad185ad/aioproperty-0.2.8.tar.gz", "yanked": false, "yanked_reason": null } ], "0.2.9": [ { "comment_text": "", "digests": { "md5": "7f340ac907e52f7f50849e72c26b0d9c", "sha256": "4e5e74566a6e52494c0dfee7c7c6a7adc653588a8ef7e4efa8028f92186ec63f" }, "downloads": -1, "filename": "aioproperty-0.2.9.tar.gz", "has_sig": false, "md5_digest": "7f340ac907e52f7f50849e72c26b0d9c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 11194, "upload_time": "2019-10-23T07:47:28", "upload_time_iso_8601": "2019-10-23T07:47:28.251489Z", "url": "https://files.pythonhosted.org/packages/2f/4c/f0e8b73342143414445a1973b564761d3c098ed7f078852be6a70af78bec/aioproperty-0.2.9.tar.gz", "yanked": false, "yanked_reason": null } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "a798deb5d1d449b2cc6f8d76a3f000e6", "sha256": "15d0b1b2bbee810f5d15920c1e17c110a989eee7373f5cd5a6f6c7b1273154fd" }, "downloads": -1, "filename": "aioproperty-0.3.0.tar.gz", "has_sig": false, "md5_digest": "a798deb5d1d449b2cc6f8d76a3f000e6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 11921, "upload_time": "2019-10-26T08:14:14", "upload_time_iso_8601": "2019-10-26T08:14:14.907206Z", "url": "https://files.pythonhosted.org/packages/4c/d5/bbcd172e2c0bd5d39e361cc1aa9a01d95b488fabf8c0a63d2aaba9b32ab0/aioproperty-0.3.0.tar.gz", "yanked": false, "yanked_reason": null } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "f7347448fa5ff587ed1e70769bf0d14b", "sha256": "e84f34b8a908040f9114114b24a0aa96001391a3e5d9f61317f4903fd81a54c2" }, "downloads": -1, "filename": "aioproperty-0.3.1.tar.gz", "has_sig": false, "md5_digest": "f7347448fa5ff587ed1e70769bf0d14b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 11929, "upload_time": "2019-10-26T18:51:39", "upload_time_iso_8601": "2019-10-26T18:51:39.255128Z", "url": "https://files.pythonhosted.org/packages/89/71/a69d261dba51eaa4d6098e44059ab5e022b8b7ee8abdee0ddf02c49e0e34/aioproperty-0.3.1.tar.gz", "yanked": false, "yanked_reason": null } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "cc57d183d9ad62e6266cc8d6fa34c94b", "sha256": "14700e5dfa3e92cc6985742e9fac71b77122b2b885689c9ca7eee4ff30d8c5ea" }, "downloads": -1, "filename": "aioproperty-0.3.2.tar.gz", "has_sig": false, "md5_digest": "cc57d183d9ad62e6266cc8d6fa34c94b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 11959, "upload_time": "2019-10-28T16:11:51", "upload_time_iso_8601": "2019-10-28T16:11:51.221734Z", "url": "https://files.pythonhosted.org/packages/37/25/b1d32701f8368f2c02502048bc0e55d231cc6f97ff4f6b9260715faee9b0/aioproperty-0.3.2.tar.gz", "yanked": false, "yanked_reason": null } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cc57d183d9ad62e6266cc8d6fa34c94b", "sha256": "14700e5dfa3e92cc6985742e9fac71b77122b2b885689c9ca7eee4ff30d8c5ea" }, "downloads": -1, "filename": "aioproperty-0.3.2.tar.gz", "has_sig": false, "md5_digest": "cc57d183d9ad62e6266cc8d6fa34c94b", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 11959, "upload_time": "2019-10-28T16:11:51", "upload_time_iso_8601": "2019-10-28T16:11:51.221734Z", "url": "https://files.pythonhosted.org/packages/37/25/b1d32701f8368f2c02502048bc0e55d231cc6f97ff4f6b9260715faee9b0/aioproperty-0.3.2.tar.gz", "yanked": false, "yanked_reason": null } ], "vulnerabilities": [] }