{ "info": { "author": "Victor Kovtun", "author_email": "hellysmile@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "async_lru\n=========\n\n:info: Simple lru cache for asyncio\n\n.. image:: https://travis-ci.org/aio-libs/async_lru.svg?branch=master\n :target: https://travis-ci.org/aio-libs/async_lru\n\n.. image:: https://img.shields.io/pypi/v/async_lru.svg\n :target: https://pypi.python.org/pypi/async_lru\n\n.. image:: https://codecov.io/gh/aio-libs/async_lru/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/aio-libs/async_lru\n\nInstallation\n------------\n\n.. code-block:: shell\n\n pip install async_lru\n\nUsage\n-----\n\nThis package is 100% port of Python built-in function `functools.lru_cache `_ for `asyncio `_\n\n.. code-block:: python\n\n import asyncio\n\n import aiohttp\n from async_lru import alru_cache\n\n\n @alru_cache(maxsize=32)\n async def get_pep(num):\n resource = 'http://www.python.org/dev/peps/pep-%04d/' % num\n async with aiohttp.ClientSession() as session:\n try:\n async with session.get(resource) as s:\n return await s.read()\n except aiohttp.ClientError:\n return 'Not Found'\n\n\n async def main():\n for n in 8, 290, 308, 320, 8, 218, 320, 279, 289, 320, 9991:\n pep = await get_pep(n)\n print(n, len(pep))\n\n print(get_pep.cache_info())\n # CacheInfo(hits=3, misses=8, maxsize=32, currsize=8)\n\n # closing is optional, but highly recommended\n await get_pep.close()\n\n\n loop = asyncio.get_event_loop()\n\n loop.run_until_complete(main())\n\n loop.close()\n\nPython 3.3+ is required\n\nThanks\n------\n\nThe library was donated by `Ocean S.A. `_\n\nThanks to the company for contribution.\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/wikibusiness/async_lru", "keywords": "asyncio", "license": "", "maintainer": "", "maintainer_email": "", "name": "async_lru", "package_url": "https://pypi.org/project/async_lru/", "platform": "", "project_url": "https://pypi.org/project/async_lru/", "project_urls": { "Homepage": "https://github.com/wikibusiness/async_lru" }, "release_url": "https://pypi.org/project/async_lru/1.0.2/", "requires_dist": null, "requires_python": "", "summary": "Simple lru_cache for asyncio", "version": "1.0.2" }, "last_serial": 4685019, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "71a6c250624f2ef82f9e75f84178c39f", "sha256": "e5db10bd6342d5ba4d29704b1dbb5a5b77e04b2d548d783d1092a520a000aac7" }, "downloads": -1, "filename": "async_lru-0.0.1.tar.gz", "has_sig": false, "md5_digest": "71a6c250624f2ef82f9e75f84178c39f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3293, "upload_time": "2017-04-01T23:40:12", "url": "https://files.pythonhosted.org/packages/af/40/3c7e62490f07d55341c586652ac5b761704816ae7f776dd33210ca24a40e/async_lru-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "5b8274bc5a66cc99b4e48bd85b6bf1a0", "sha256": "b381b1bf703e69ede11b2af9b183ebb9747f9d3f89951d3daaacd796f8c1413f" }, "downloads": -1, "filename": "async_lru-0.0.2.tar.gz", "has_sig": false, "md5_digest": "5b8274bc5a66cc99b4e48bd85b6bf1a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3328, "upload_time": "2017-04-02T00:28:47", "url": "https://files.pythonhosted.org/packages/ff/e0/b085a0d88a5a301d59eac982e528a141b2bacae1aedec53e9f8587c8160a/async_lru-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "1744953cf0f995680b335a349cb9d6d3", "sha256": "36f00c62fde2dc2601a9fa562e133f81c505adc00d63745d8b8cc4f0e60d0714" }, "downloads": -1, "filename": "async_lru-0.0.3.tar.gz", "has_sig": false, "md5_digest": "1744953cf0f995680b335a349cb9d6d3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4058, "upload_time": "2017-05-10T12:30:23", "url": "https://files.pythonhosted.org/packages/50/f5/be77e764839756dbf11aa42162b82e82ec50e16caed7e5b2f9470efef578/async_lru-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "56afca2b8a0b0903371096625f4a05b1", "sha256": "ab285b56afbae460927e7b4ccc14c691d7cd23fe97bf904cee8b33f2935d91e1" }, "downloads": -1, "filename": "async_lru-0.0.4.tar.gz", "has_sig": false, "md5_digest": "56afca2b8a0b0903371096625f4a05b1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4055, "upload_time": "2017-05-10T20:09:37", "url": "https://files.pythonhosted.org/packages/f6/e7/cabc45d7a6da087260d23df6e7d7149b96cfdbbcc0c460ef56e4ac36be16/async_lru-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "e2d0ae5b4ea0f9fd71ca84f05c834275", "sha256": "9eecba6c248bae72f8dffed87ec12ee3838d008829406bc3b4486bef1e00a644" }, "downloads": -1, "filename": "async_lru-0.0.5.tar.gz", "has_sig": false, "md5_digest": "e2d0ae5b4ea0f9fd71ca84f05c834275", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4048, "upload_time": "2017-05-13T22:07:27", "url": "https://files.pythonhosted.org/packages/37/2e/e4050eae2761f59ae4b08c02aced0e74daf903774cd07cfab1a0f2080631/async_lru-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "701804e2b3f284f39043dcef0ddfe121", "sha256": "396219bd9c5cd47c42cf48eb8f5c949660884638ab3419ecb171794b43d9bc17" }, "downloads": -1, "filename": "async_lru-0.0.6.tar.gz", "has_sig": false, "md5_digest": "701804e2b3f284f39043dcef0ddfe121", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4054, "upload_time": "2017-05-13T22:13:40", "url": "https://files.pythonhosted.org/packages/5a/2f/3342c29a9f03a3b11c1ad1522da5a8618553c45d25c544580be1a983d562/async_lru-0.0.6.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "1c3a394aacae4caec72c3b1018ea35b4", "sha256": "5b11c5a5d9e238a11c8e908989bb23bb09472acf5c927f0b868925d9ff1b3e6c" }, "downloads": -1, "filename": "async_lru-0.1.0.tar.gz", "has_sig": false, "md5_digest": "1c3a394aacae4caec72c3b1018ea35b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4689, "upload_time": "2017-10-13T21:53:46", "url": "https://files.pythonhosted.org/packages/5c/24/c2a4ab97f70ba01272c270ff44a72b8aac989752537bebd8e641a9fafa11/async_lru-0.1.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "76f017d76b75ac0820e47324407bde95", "sha256": "851318e5e6f6f758efe3f6a083a05d292ccc3a9dae3fdcd2edfe0d7b8bd97ed9" }, "downloads": -1, "filename": "async_lru-1.0.0.tar.gz", "has_sig": false, "md5_digest": "76f017d76b75ac0820e47324407bde95", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4914, "upload_time": "2018-02-06T15:35:38", "url": "https://files.pythonhosted.org/packages/13/ee/c4ead3f64d50659818ba25baffbf09f48454ff42d4cf2aae0938298c68f5/async_lru-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "b6740895a9a6a15bf20282ab46a26ffb", "sha256": "ac1f7138b54d68570391615b1ff758e189ce2b841a16653aae1255f5be5d4d0b" }, "downloads": -1, "filename": "async_lru-1.0.1.tar.gz", "has_sig": false, "md5_digest": "b6740895a9a6a15bf20282ab46a26ffb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4911, "upload_time": "2018-02-09T10:58:54", "url": "https://files.pythonhosted.org/packages/30/fc/a9a15a5fc778c425320b31da972ea241b9d660f6c95f82a2f134704a96fe/async_lru-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "69bed62927426353513e68aec77989ab", "sha256": "baa898027619f5cc31b7966f96f00e4fc0df43ba206a8940a5d1af5336a477cb" }, "downloads": -1, "filename": "async_lru-1.0.2.tar.gz", "has_sig": false, "md5_digest": "69bed62927426353513e68aec77989ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4964, "upload_time": "2019-01-11T11:18:32", "url": "https://files.pythonhosted.org/packages/7e/c1/a3d6207deaaeb582d16dc9a0fd217f192efc9487ce59897131cf9a2bdc1c/async_lru-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "69bed62927426353513e68aec77989ab", "sha256": "baa898027619f5cc31b7966f96f00e4fc0df43ba206a8940a5d1af5336a477cb" }, "downloads": -1, "filename": "async_lru-1.0.2.tar.gz", "has_sig": false, "md5_digest": "69bed62927426353513e68aec77989ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4964, "upload_time": "2019-01-11T11:18:32", "url": "https://files.pythonhosted.org/packages/7e/c1/a3d6207deaaeb582d16dc9a0fd217f192efc9487ce59897131cf9a2bdc1c/async_lru-1.0.2.tar.gz" } ] }