{ "info": { "author": "Justus Schwabedal", "author_email": "jschwabedal@belco.tech", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Cached Property\n\nThis module adds a decorator `cached_property` and a function `drop_cache`.\n\n## Example\n\n```python\nfrom cached_property import cached_property, drop_cache\nimport time\n\nclass Dummy:\n @cached_property\n def the_answer(self):\n time.sleep(0.5)\n return 42\n\ndummy = Dummy()\nt0 = time.time()\nerr = dummy.the_answer\ndt = time.time()-t0\nprint(dt)\n# dt -> ~0.5 seconds\nt0 = time.time()\nerr = dummy.the_answer\ndt = time.time()-t0\nprint(dt)\n# dt -> ~1e-6 seconds\ndrop_cache(dummy, 'the_answer')\nt0 = time.time()\nerr = dummy.the_answer\ndt = time.time()-t0\nprint(dt)\n# dt -> ~0.5 seconds\n```\n\n## License and Copyright\nCopyright 2019 Brain Electrophysiology Laboratory Company LLC\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this module or the code within it except in\ncompliance with the License.\n\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "", "keywords": "", "license": "", "maintainer": "Justus Schwabedal", "maintainer_email": "jschwabedal@belco.tech", "name": "cached-property-bel", "package_url": "https://pypi.org/project/cached-property-bel/", "platform": "", "project_url": "https://pypi.org/project/cached-property-bel/", "project_urls": null, "release_url": "https://pypi.org/project/cached-property-bel/1.0.1/", "requires_dist": null, "requires_python": ">=3.6", "summary": "A cached-property decorator.", "version": "1.0.1" }, "last_serial": 5891298, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "f33dd58c711b1bb183f9a94167f37c03", "sha256": "8d9ad14ad6f95e81871ec4aec27ab91f9b0beebcd1ce6c17a1f00bee7c2d9d3a" }, "downloads": -1, "filename": "cached_property_bel-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f33dd58c711b1bb183f9a94167f37c03", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 4511, "upload_time": "2019-09-26T15:38:40", "url": "https://files.pythonhosted.org/packages/86/e2/9b8c9a3a4597b57fd0894c57cfc284497a97291fd39c779d31bfffa0c862/cached_property_bel-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7ed58eff7227f406e5313e280b8c472c", "sha256": "9d0db437ceaf0ebb734b962581cd17d949f497e88d94ad342779a9093e40b6ef" }, "downloads": -1, "filename": "cached_property_bel-1.0.1.tar.gz", "has_sig": false, "md5_digest": "7ed58eff7227f406e5313e280b8c472c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 2555, "upload_time": "2019-09-26T15:38:43", "url": "https://files.pythonhosted.org/packages/f1/01/81435405fadeb421d6c72c39d92e491513e5ac3ca67520c7f152cf0c62c5/cached_property_bel-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f33dd58c711b1bb183f9a94167f37c03", "sha256": "8d9ad14ad6f95e81871ec4aec27ab91f9b0beebcd1ce6c17a1f00bee7c2d9d3a" }, "downloads": -1, "filename": "cached_property_bel-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "f33dd58c711b1bb183f9a94167f37c03", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 4511, "upload_time": "2019-09-26T15:38:40", "url": "https://files.pythonhosted.org/packages/86/e2/9b8c9a3a4597b57fd0894c57cfc284497a97291fd39c779d31bfffa0c862/cached_property_bel-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7ed58eff7227f406e5313e280b8c472c", "sha256": "9d0db437ceaf0ebb734b962581cd17d949f497e88d94ad342779a9093e40b6ef" }, "downloads": -1, "filename": "cached_property_bel-1.0.1.tar.gz", "has_sig": false, "md5_digest": "7ed58eff7227f406e5313e280b8c472c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 2555, "upload_time": "2019-09-26T15:38:43", "url": "https://files.pythonhosted.org/packages/f1/01/81435405fadeb421d6c72c39d92e491513e5ac3ca67520c7f152cf0c62c5/cached_property_bel-1.0.1.tar.gz" } ] }