{ "info": { "author": "Mohamed Hendawy", "author_email": "hendawy@outlook.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta" ], "description": "lru_py\r\n======\r\n\r\nA simple python implementation for the least recently used caching algorithm.\r\n\r\n\r\nHello, world\r\n------------\r\n\r\n**A simple use for LRU**::\r\n\r\n\tfrom lru_py import LRU\r\n\r\n\tlru_cache = LRU(max_size = 2)\r\n\tlru_cache['hello'] = 'world'\r\n\tlru_cache['world'] = 'hello'\r\n\tlru_cache['hello'] = 'world'\r\n\tprint \"The first item now is: \" + lru_cache.top()\r\n\tprint \"The value of the key 'world' now is: \" + lru_cache['world']\r\n\tprint \"The first item now after retrieving the key 'world' is: \" +lru_cache.top()\r\n\r\n\r\nHow To:\r\n------------\r\n\r\nInitializing an object:\r\n\r\n\tlru_cache = LRU(max_size = 2)\r\n\r\nSetting a value, regular assigningment with the square bracket operator [ ]:\r\n\r\n\tlru_cache['hello'] = 'world'\r\n\r\nRetrieving a value, using square bracket operator [ ]:\r\n\r\n\tlru_cache['hello']\r\n\r\nDeletin, using the del and using square bracket operators:\r\n\r\n\tdel lru_cache['hello']\r\n\r\nRetrieving the most recently used item:\r\n\r\n\tlru_cache.top()\r\n\r\nInstallation\r\n------------\r\n\r\n**Automatic installation**::\r\n\r\n\tpip install lru_py\r\n\r\n**Manual installation**: Download the latest source from `GitHub \r\n`_.\r\n\r\n.. parsed-literal::\r\n\r\n\ttar xvzf lru_py-[VERSION].tar.gz\r\n\tcd lru_py-[VERSION]\r\n\tpython setup.py build\r\n\tsudo python setup.py install", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/hendawy/lru_py/releases", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hendawy/lru_py", "keywords": "caching,LRU,lru cache,lru_py,py_lru,pylru,lrupy,caching algorithm,lru-py,py-lru", "license": "UNKNOWN", "maintainer": "", "maintainer_email": "", "name": "lru_py", "package_url": "https://pypi.org/project/lru_py/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/lru_py/", "project_urls": { "Download": "https://github.com/hendawy/lru_py/releases", "Homepage": "https://github.com/hendawy/lru_py" }, "release_url": "https://pypi.org/project/lru_py/0.2/", "requires_dist": null, "requires_python": null, "summary": "a simple implementation for the least recently used caching algorithm (LRU)", "version": "0.2" }, "last_serial": 1210230, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "18fff12bf19d8113a20c61ceb7014e61", "sha256": "82cc8317872278979063f51cc48dacb66713c4dcadcbfe6994d4d651ee0627b1" }, "downloads": -1, "filename": "lru_py-0.1.tar.gz", "has_sig": false, "md5_digest": "18fff12bf19d8113a20c61ceb7014e61", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2363, "upload_time": "2014-08-09T11:39:06", "url": "https://files.pythonhosted.org/packages/49/90/e5ce3595bba6fb7ecec47a8fa4c60bf99505ce76793398eb0173acc456ca/lru_py-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "5ee844befb9d8f5e16ec9a268dddccdf", "sha256": "6a002c09c0130b69bec03558939f997f1abe25090f617a8b26f7cb454de500c2" }, "downloads": -1, "filename": "lru_py-0.2.tar.gz", "has_sig": false, "md5_digest": "5ee844befb9d8f5e16ec9a268dddccdf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2428, "upload_time": "2014-09-02T10:30:58", "url": "https://files.pythonhosted.org/packages/15/32/7a02a225aef18f2de3e8eae331eabde9eb94b008b77ed2e01e549b700364/lru_py-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5ee844befb9d8f5e16ec9a268dddccdf", "sha256": "6a002c09c0130b69bec03558939f997f1abe25090f617a8b26f7cb454de500c2" }, "downloads": -1, "filename": "lru_py-0.2.tar.gz", "has_sig": false, "md5_digest": "5ee844befb9d8f5e16ec9a268dddccdf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2428, "upload_time": "2014-09-02T10:30:58", "url": "https://files.pythonhosted.org/packages/15/32/7a02a225aef18f2de3e8eae331eabde9eb94b008b77ed2e01e549b700364/lru_py-0.2.tar.gz" } ] }