Name | anycache JSON |
Version |
2.1.0
JSON |
| download |
home_page | |
Summary | Cache any python object to file using improved pickling |
upload_time | 2023-10-27 23:26:06 |
maintainer | |
docs_url | None |
author | c0fec0de |
requires_python | >=3.8,<4 |
license | Apache-2.0 |
keywords |
cache
caching
cache file
pickle
dill
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
.. image:: https://badge.fury.io/py/anycache.svg
:target: https://badge.fury.io/py/anycache
.. image:: https://img.shields.io/pypi/dm/anycache.svg?label=pypi%20downloads
:target: https://pypi.python.org/pypi/anycache
.. image:: https://readthedocs.org/projects/anycache/badge/?version=latest
:target: https://anycache.readthedocs.io/en/latest/?badge=latest
.. image:: https://coveralls.io/repos/github/c0fec0de/anycache/badge.svg
:target: https://coveralls.io/github/c0fec0de/anycache
.. image:: https://readthedocs.org/projects/anycache/badge/?version=2.1.0
:target: https://anycache.readthedocs.io/en/2.1.0/?badge=2.1.0
.. image:: https://img.shields.io/pypi/pyversions/anycache.svg
:target: https://pypi.python.org/pypi/anycache
.. image:: https://img.shields.io/badge/code%20style-pep8-brightgreen.svg
:target: https://www.python.org/dev/peps/pep-0008/
.. image:: https://img.shields.io/badge/code%20style-pep257-brightgreen.svg
:target: https://www.python.org/dev/peps/pep-0257/
.. image:: https://img.shields.io/badge/linter-pylint-%231674b1?style=flat
:target: https://www.pylint.org/
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
.. image:: https://img.shields.io/github/contributors/c0fec0de/anycache.svg
:target: https://github.com/c0fec0de/anycache/graphs/contributors/
.. image:: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square
:target: http://makeapullrequest.com
.. image:: https://img.shields.io/github/issues-pr/c0fec0de/anycache.svg
:target: https://github.com/c0fec0de/anycache/pulls
.. image:: https://img.shields.io/github/issues-pr-closed/c0fec0de/anycache.svg
:target: https://github.com/c0fec0de/anycache/pulls?q=is%3Apr+is%3Aclosed
Links
=====
* Documentation_
* PyPI_
* GitHub_
* Changelog_
* Issues_
* Contributors_
.. _anycache: https://anycache.readthedocs.io/en//
.. _Documentation: https://anycache.readthedocs.io/en//
.. _PyPI: https://pypi.org/project/anycache//
.. _GitHub: https://github.com/c0fec0de/anycache
.. _Changelog: https://github.com/c0fec0de/anycache/releases
.. _Issues: https://github.com/c0fec0de/anycache/issues
.. _Contributors: https://github.com/c0fec0de/anycache/graphs/contributors
.. _getting_started:
To cache the result of a function, use the global unlimited anycache:
>>> from anycache import anycache
>>> @anycache()
... def myfunc(posarg, kwarg=3):
... print(" Calcing %r + %r = %r" % (posarg, kwarg, posarg + kwarg))
... return posarg + kwarg
>>> myfunc(8, 5)
Calcing 8 + 5 = 13
13
>>> myfunc(8, 5)
13
`anycache` caches nearly any python object. Also `lambda` statements.
It uses Dill_ as backend. An improved version of pythons build-in `pickle`.
To preserve the result between multiple python runs, a persistent cache
directory needs to be set.
>>> from anycache import anycache
>>> @anycache(cachedir='/tmp/anycache.my')
... def myfunc(posarg, kwarg=3):
... return posarg + kwarg
The `AnyCache` object serves additional functions for cache clearing and
size handling.
.. _Dill: https://pypi.python.org/pypi/dill
Installation
============
To install the `anycache` module run::
pip install anycache
If you do not have write-permissions to the python installation, try::
pip install anycache --user
Raw data
{
"_id": null,
"home_page": "",
"name": "anycache",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8,<4",
"maintainer_email": "",
"keywords": "cache,caching,cache file,pickle,dill",
"author": "c0fec0de",
"author_email": "c0fec0de@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/b7/59/5a2c89aa63117f3dd1d1856e5c48f404f1034ce80466ff524d94941edfa5/anycache-2.1.0.tar.gz",
"platform": null,
"description": "\n.. image:: https://badge.fury.io/py/anycache.svg\n :target: https://badge.fury.io/py/anycache\n\n.. image:: https://img.shields.io/pypi/dm/anycache.svg?label=pypi%20downloads\n :target: https://pypi.python.org/pypi/anycache\n\n.. image:: https://readthedocs.org/projects/anycache/badge/?version=latest\n :target: https://anycache.readthedocs.io/en/latest/?badge=latest\n\n.. image:: https://coveralls.io/repos/github/c0fec0de/anycache/badge.svg\n :target: https://coveralls.io/github/c0fec0de/anycache\n\n.. image:: https://readthedocs.org/projects/anycache/badge/?version=2.1.0\n :target: https://anycache.readthedocs.io/en/2.1.0/?badge=2.1.0\n\n.. image:: https://img.shields.io/pypi/pyversions/anycache.svg\n :target: https://pypi.python.org/pypi/anycache\n\n.. image:: https://img.shields.io/badge/code%20style-pep8-brightgreen.svg\n :target: https://www.python.org/dev/peps/pep-0008/\n\n.. image:: https://img.shields.io/badge/code%20style-pep257-brightgreen.svg\n :target: https://www.python.org/dev/peps/pep-0257/\n\n.. image:: https://img.shields.io/badge/linter-pylint-%231674b1?style=flat\n :target: https://www.pylint.org/\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n\n.. image:: https://img.shields.io/github/contributors/c0fec0de/anycache.svg\n :target: https://github.com/c0fec0de/anycache/graphs/contributors/\n\n.. image:: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\n :target: http://makeapullrequest.com\n\n.. image:: https://img.shields.io/github/issues-pr/c0fec0de/anycache.svg\n :target: https://github.com/c0fec0de/anycache/pulls\n\n.. image:: https://img.shields.io/github/issues-pr-closed/c0fec0de/anycache.svg\n :target: https://github.com/c0fec0de/anycache/pulls?q=is%3Apr+is%3Aclosed\n\nLinks\n=====\n\n* Documentation_\n* PyPI_\n* GitHub_\n* Changelog_\n* Issues_\n* Contributors_\n\n.. _anycache: https://anycache.readthedocs.io/en//\n.. _Documentation: https://anycache.readthedocs.io/en//\n.. _PyPI: https://pypi.org/project/anycache//\n.. _GitHub: https://github.com/c0fec0de/anycache\n.. _Changelog: https://github.com/c0fec0de/anycache/releases\n.. _Issues: https://github.com/c0fec0de/anycache/issues\n.. _Contributors: https://github.com/c0fec0de/anycache/graphs/contributors\n\n.. _getting_started:\n\nTo cache the result of a function, use the global unlimited anycache:\n\n>>> from anycache import anycache\n>>> @anycache()\n... def myfunc(posarg, kwarg=3):\n... print(\" Calcing %r + %r = %r\" % (posarg, kwarg, posarg + kwarg))\n... return posarg + kwarg\n>>> myfunc(8, 5)\n Calcing 8 + 5 = 13\n13\n>>> myfunc(8, 5)\n13\n\n`anycache` caches nearly any python object. Also `lambda` statements.\nIt uses Dill_ as backend. An improved version of pythons build-in `pickle`.\n\nTo preserve the result between multiple python runs, a persistent cache\ndirectory needs to be set.\n\n>>> from anycache import anycache\n>>> @anycache(cachedir='/tmp/anycache.my')\n... def myfunc(posarg, kwarg=3):\n... return posarg + kwarg\n\nThe `AnyCache` object serves additional functions for cache clearing and\nsize handling.\n\n.. _Dill: https://pypi.python.org/pypi/dill\n\nInstallation\n============\n\nTo install the `anycache` module run::\n\n pip install anycache\n\nIf you do not have write-permissions to the python installation, try::\n\n pip install anycache --user\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Cache any python object to file using improved pickling",
"version": "2.1.0",
"project_urls": null,
"split_keywords": [
"cache",
"caching",
"cache file",
"pickle",
"dill"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "dde5cf35063b3d623a62b0f4a307064cca512302a02433d87ebf435d9e8a6c13",
"md5": "3364e781c16ec0f044d57a17dcb4c83f",
"sha256": "4c4f9e4664fc303f943e4dc4cc772114bfbff04884d39882583fd7d4a91ec4d6"
},
"downloads": -1,
"filename": "anycache-2.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3364e781c16ec0f044d57a17dcb4c83f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8,<4",
"size": 10362,
"upload_time": "2023-10-27T23:26:04",
"upload_time_iso_8601": "2023-10-27T23:26:04.217495Z",
"url": "https://files.pythonhosted.org/packages/dd/e5/cf35063b3d623a62b0f4a307064cca512302a02433d87ebf435d9e8a6c13/anycache-2.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "b7595a2c89aa63117f3dd1d1856e5c48f404f1034ce80466ff524d94941edfa5",
"md5": "3e82014be608e72ba2e0a901d8ca17db",
"sha256": "4806115dac741e550ee1848f4f4c5d960fbd216eaa36f0ed6e0e1db45363e1ed"
},
"downloads": -1,
"filename": "anycache-2.1.0.tar.gz",
"has_sig": false,
"md5_digest": "3e82014be608e72ba2e0a901d8ca17db",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8,<4",
"size": 10281,
"upload_time": "2023-10-27T23:26:06",
"upload_time_iso_8601": "2023-10-27T23:26:06.126570Z",
"url": "https://files.pythonhosted.org/packages/b7/59/5a2c89aa63117f3dd1d1856e5c48f404f1034ce80466ff524d94941edfa5/anycache-2.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-27 23:26:06",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "anycache"
}