{ "info": { "author": "Jair Henrique", "author_email": "jair.henrique@gmail.com", "bugtrack_url": null, "classifiers": [ "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "# django-elephant\n\n[![Build Status](https://travis-ci.org/jairhenrique/django-elephant.svg)](https://travis-ci.org/jairhenrique/django-elephant)\n[![PyPI version](https://badge.fury.io/py/django-elephant.svg)](https://badge.fury.io/py/django-elephant)\n[![codecov.io](https://codecov.io/github/jairhenrique/django-elephant/coverage.svg?branch=master)](https://codecov.io/github/jairhenrique/django-elephant?branch=master)\n[![Code Issues](https://www.quantifiedcode.com/api/v1/project/03084631935244baa8335617d6502d11/badge.svg)](https://www.quantifiedcode.com/app/project/03084631935244baa8335617d6502d11)\n\n\n*django-elephant is a simple wrapper to cache responses of Django methods or functions*\n\n\n## Setup\n\n```bash\npip install django-elephant\n```\n\n## Usage\n\n#### Basic:\n\n```python\nfrom elephant import memorize\n\n@memorize()\ndef foo(bar):\n return bar\n```\n\n\n#### Set cache configuration:\n\n```python\nfrom django.core.cache import caches\nfrom elephant import memorize\n\nother_cache = caches['other_cache']\n\n@memorize(\n cache=other_cache\n)\ndef foo(bar):\n return bar\n```\n\n\n#### Set cache timeout:\n\n```python\nfrom elephant import memorize\n\n@memorize(\n timeout=1987\n)\ndef foo(bar):\n return bar\n```\n\n#### Set cache key:\n\n```python\nfrom elephant import memorize\n\ndef my_custom_key(function, *args, **kwargs):\n return '{}.{}'.format(\n 'elephant_'\n function.__name__\n )\n\n@memorize(\n cache_key=my_custom_key\n)\ndef foo(bar):\n return bar\n```\n\n## Requirements\n- Django>=1.5\n\n\n## Contribute\n- Fork and make a pull request!", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jairhenrique/django-elephant", "keywords": "django cache", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-elephant", "package_url": "https://pypi.org/project/django-elephant/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-elephant/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/jairhenrique/django-elephant" }, "release_url": "https://pypi.org/project/django-elephant/1.0.0/", "requires_dist": null, "requires_python": null, "summary": "A simple cache for Django functions and methods", "version": "1.0.0" }, "last_serial": 1853214, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "053c4cac1f2abfd046a2e1eda4611b02", "sha256": "3792f854484ba0fe00c64fc222d36879e218f32ebdf951544b4a649975762b43" }, "downloads": -1, "filename": "django-elephant-0.0.1.tar.gz", "has_sig": false, "md5_digest": "053c4cac1f2abfd046a2e1eda4611b02", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3116, "upload_time": "2015-11-28T14:49:12", "url": "https://files.pythonhosted.org/packages/f6/e8/e9fce73de9e7fee80e47f9cb90eb4983f257627f993fcf310ec3430dbd55/django-elephant-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "40ed47be9701e6f7c9055a54a8f96c2f", "sha256": "1be77ae6da396721cdef582bfb67632c945f2921553ab4add30840950ce89d31" }, "downloads": -1, "filename": "django_elephant-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "40ed47be9701e6f7c9055a54a8f96c2f", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 3938, "upload_time": "2015-11-30T23:39:45", "url": "https://files.pythonhosted.org/packages/6d/e1/2b0b998edc1268f815d9d0448137bead9e619e96ad7ed1cb7e6ec4d52af7/django_elephant-0.0.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "6287f56f8776af17841aa1240816bff8", "sha256": "a3bbfb59b1e048ef1476cbcf2e2fe03035723a6f649ce3b5084e4a84c075bbf2" }, "downloads": -1, "filename": "django-elephant-0.0.2.tar.gz", "has_sig": false, "md5_digest": "6287f56f8776af17841aa1240816bff8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3600, "upload_time": "2015-11-30T23:39:36", "url": "https://files.pythonhosted.org/packages/7e/9a/665caa38403396473b1b3a21ea3c46840bdc01b0df26784f0ef26d696aaa/django-elephant-0.0.2.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "009dd89baaf8dca7aaba907c195308a3", "sha256": "9fb8c7babc19d65b75d884ee8bdfa8871cc64b98c68e15c96ff889ffe193345a" }, "downloads": -1, "filename": "django_elephant-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "009dd89baaf8dca7aaba907c195308a3", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 4807, "upload_time": "2015-12-09T02:44:38", "url": "https://files.pythonhosted.org/packages/5d/7f/c794639e4f5b77d769e48b082f94eb3febead030592db41571df9eff8536/django_elephant-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4ad6d5003283c7fd9bf655a927ce6b0b", "sha256": "003c4a5f2660556a417602a93108b5240b2a2b30aa95bcba8c1d081097510a9d" }, "downloads": -1, "filename": "django-elephant-1.0.0.tar.gz", "has_sig": false, "md5_digest": "4ad6d5003283c7fd9bf655a927ce6b0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4983, "upload_time": "2015-12-09T02:44:29", "url": "https://files.pythonhosted.org/packages/fa/de/899335080c19eaff39722830b1cb061c1e995b965ab13c52dc10b6b6b248/django-elephant-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "009dd89baaf8dca7aaba907c195308a3", "sha256": "9fb8c7babc19d65b75d884ee8bdfa8871cc64b98c68e15c96ff889ffe193345a" }, "downloads": -1, "filename": "django_elephant-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "009dd89baaf8dca7aaba907c195308a3", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 4807, "upload_time": "2015-12-09T02:44:38", "url": "https://files.pythonhosted.org/packages/5d/7f/c794639e4f5b77d769e48b082f94eb3febead030592db41571df9eff8536/django_elephant-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4ad6d5003283c7fd9bf655a927ce6b0b", "sha256": "003c4a5f2660556a417602a93108b5240b2a2b30aa95bcba8c1d081097510a9d" }, "downloads": -1, "filename": "django-elephant-1.0.0.tar.gz", "has_sig": false, "md5_digest": "4ad6d5003283c7fd9bf655a927ce6b0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4983, "upload_time": "2015-12-09T02:44:29", "url": "https://files.pythonhosted.org/packages/fa/de/899335080c19eaff39722830b1cb061c1e995b965ab13c52dc10b6b6b248/django-elephant-1.0.0.tar.gz" } ] }