Name | anycache JSON |
Version |
2.3.1
JSON |
| download |
home_page | None |
Summary | Cache any python object to file using improved pickling |
upload_time | 2025-01-08 21:31:01 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
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
:target: https://anycache.readthedocs.io/en/stable
.. image:: https://img.shields.io/pypi/pyversions/anycache.svg
:target: https://pypi.python.org/pypi/anycache
.. 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
To cache the result of a function, use the global unlimited anycache:
* 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:
>>> 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": null,
"name": "anycache",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "cache, caching, cache file, pickle, dill",
"author": null,
"author_email": "Daniel Jakschik <c0fec0de@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/bc/14/af30ad16c5d86ee4ffbccdd10dd942dc4af6d2ec5ea3827ebbfee8a6a5f3/anycache-2.3.1.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\n :target: https://anycache.readthedocs.io/en/stable\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/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\nTo cache the result of a function, use the global unlimited anycache:\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\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": null,
"summary": "Cache any python object to file using improved pickling",
"version": "2.3.1",
"project_urls": {
"bugs": "https://github.com/c0fec0de/anycache/issues",
"documentation": "https://anycache.readthedocs.io/en/latest/",
"homepage": "https://github.com/c0fec0de/anycache",
"repository": "https://github.com/c0fec0de/anycache"
},
"split_keywords": [
"cache",
" caching",
" cache file",
" pickle",
" dill"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "4ed246ce2b6b43100b726c8246732c3408ac60efd2aa6f70853cec83e18d1fda",
"md5": "0e2088ecec91b3bb42f1816399a3c8aa",
"sha256": "84e6c89a65ce1f21c5c0bd8dd0cd951bd8cb6a98236e54983df65fa4a8fdade9"
},
"downloads": -1,
"filename": "anycache-2.3.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0e2088ecec91b3bb42f1816399a3c8aa",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 10974,
"upload_time": "2025-01-08T21:30:59",
"upload_time_iso_8601": "2025-01-08T21:30:59.622911Z",
"url": "https://files.pythonhosted.org/packages/4e/d2/46ce2b6b43100b726c8246732c3408ac60efd2aa6f70853cec83e18d1fda/anycache-2.3.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "bc14af30ad16c5d86ee4ffbccdd10dd942dc4af6d2ec5ea3827ebbfee8a6a5f3",
"md5": "1fea85c8f9f37ef7a1b911e1c60a0167",
"sha256": "462644b1a54186edab9787dfae943bac1b735bb983bba2a9957318a6ca4ea5ec"
},
"downloads": -1,
"filename": "anycache-2.3.1.tar.gz",
"has_sig": false,
"md5_digest": "1fea85c8f9f37ef7a1b911e1c60a0167",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 13696,
"upload_time": "2025-01-08T21:31:01",
"upload_time_iso_8601": "2025-01-08T21:31:01.018037Z",
"url": "https://files.pythonhosted.org/packages/bc/14/af30ad16c5d86ee4ffbccdd10dd942dc4af6d2ec5ea3827ebbfee8a6a5f3/anycache-2.3.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-08 21:31:01",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "c0fec0de",
"github_project": "anycache",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "anycache"
}