{ "info": { "author": "Brian Stajkowski", "author_email": "stajkowski100@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Simple Caching Library for Python\n[![Build Status](https://travis-ci.org/stajkowski/simple-cache.svg?branch=master)](https://travis-ci.org/stajkowski/simple-cache)\n\n# Summary\nSimple caching library for supported providers. Pass method call to caching provider along with\ngenerated key to populate memcached with the result. The results will be returned with a boolean value\nif there was a cache miss to assist in any metrics generation.\n\n# Versions\n0.0.1 - Support for memcached and json conversion\n\n# Getting Started\n1. Instantiate the provider:\n ```python\n from simplecache.common.json_conversion import JsonConversion\n from simplecache.providers.memcached import MemcachedProvider\n\n memcached = MemcachedProvider(JsonConversion(), servers='127.0.0.1')\n ```\n2. PUT data into Memcached:\n ```python\n\n data = {\n 'test1': 'value1',\n 'test2': 'value2'\n }\n\n memcached.put('testkey1', 60, data) \n ```\n3. GET data by key from provider. Optionally: Pass a method for a cache miss to load\ndata into provider from the result.\n\n ```python\n class TestClass(object):\n\n def test_method(self, param1, param2):\n data = {\n 'test1': 'value1',\n 'test2': 'value2'\n }\n if param1 != 'p1' or param2 != 'p2':\n raise Exception('Unexpected error.')\n return data\n\n t = TestClass()\n\n # test local instance of memcached with cache miss\n response, miss = memcached.get(\n 'testkey2', 60, t.test_method, param1='p1', param2='p2')\n ```\n4. DELETE data by key from provider.\n ```python\n memcached.delete('testkey1')\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": "https://github.com/stajkowski/simple-cache", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pysimplecache", "package_url": "https://pypi.org/project/pysimplecache/", "platform": "", "project_url": "https://pypi.org/project/pysimplecache/", "project_urls": { "Homepage": "https://github.com/stajkowski/simple-cache" }, "release_url": "https://pypi.org/project/pysimplecache/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "A simple caching library for Python", "version": "0.0.1" }, "last_serial": 4950721, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "d7bce7df289eb896574701d660243ca9", "sha256": "85de7b5e6381153c3ede48222988230a9046165240f67464857907b7ec8daf1f" }, "downloads": -1, "filename": "pysimplecache-0.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "d7bce7df289eb896574701d660243ca9", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6917, "upload_time": "2019-03-17T16:37:14", "url": "https://files.pythonhosted.org/packages/02/3c/a9bd868ae55742534cd1af91433dc5a87999c0176c7c1dc3d06055b578ab/pysimplecache-0.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "78a223f2addf204b9ab1543482bd6baa", "sha256": "12f047079247c3f057fb2091eab3f1e4be57c1923af80672076aeac759c4f9d5" }, "downloads": -1, "filename": "pysimplecache-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "78a223f2addf204b9ab1543482bd6baa", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6917, "upload_time": "2019-03-17T16:37:16", "url": "https://files.pythonhosted.org/packages/5d/8d/b7141abe941facd0459b679a850809d0095a1d1462160cb33ee425cd18e0/pysimplecache-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "04a0435b8e56ad1e5bb08365c1ecbd60", "sha256": "4c16c768521af6389b51ad63c3d1983414aa30e99e9288c9bc923029e58f55ac" }, "downloads": -1, "filename": "pysimplecache-0.0.1.tar.gz", "has_sig": false, "md5_digest": "04a0435b8e56ad1e5bb08365c1ecbd60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3718, "upload_time": "2019-03-17T16:37:17", "url": "https://files.pythonhosted.org/packages/40/17/c77a35449fb5fc3fda3522f7d7eaafcc65cbd1ae516b420e83e4b7d65771/pysimplecache-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d7bce7df289eb896574701d660243ca9", "sha256": "85de7b5e6381153c3ede48222988230a9046165240f67464857907b7ec8daf1f" }, "downloads": -1, "filename": "pysimplecache-0.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "d7bce7df289eb896574701d660243ca9", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 6917, "upload_time": "2019-03-17T16:37:14", "url": "https://files.pythonhosted.org/packages/02/3c/a9bd868ae55742534cd1af91433dc5a87999c0176c7c1dc3d06055b578ab/pysimplecache-0.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "78a223f2addf204b9ab1543482bd6baa", "sha256": "12f047079247c3f057fb2091eab3f1e4be57c1923af80672076aeac759c4f9d5" }, "downloads": -1, "filename": "pysimplecache-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "78a223f2addf204b9ab1543482bd6baa", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 6917, "upload_time": "2019-03-17T16:37:16", "url": "https://files.pythonhosted.org/packages/5d/8d/b7141abe941facd0459b679a850809d0095a1d1462160cb33ee425cd18e0/pysimplecache-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "04a0435b8e56ad1e5bb08365c1ecbd60", "sha256": "4c16c768521af6389b51ad63c3d1983414aa30e99e9288c9bc923029e58f55ac" }, "downloads": -1, "filename": "pysimplecache-0.0.1.tar.gz", "has_sig": false, "md5_digest": "04a0435b8e56ad1e5bb08365c1ecbd60", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3718, "upload_time": "2019-03-17T16:37:17", "url": "https://files.pythonhosted.org/packages/40/17/c77a35449fb5fc3fda3522f7d7eaafcc65cbd1ae516b420e83e4b7d65771/pysimplecache-0.0.1.tar.gz" } ] }