1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
3 NAMEBASE= python-cachetools
7 SDESC[py310]= Extensible memoizing collections (3.10)
8 SDESC[py39]= Extensible memoizing collections (3.9)
9 HOMEPAGE= https://github.com/tkem/cachetools/
10 CONTACT= Python_Automaton[python@ironwolf.systems]
13 SITES[main]= PYPIWHL/68/aa/5fc646cae6e997c3adf3b0a7e257cda75cff21fcba15354dffd67789b7bb
14 DISTFILE[1]= cachetools-5.2.0-py3-none-any.whl:main
19 OPTIONS_AVAILABLE= PY39 PY310
20 OPTIONS_STANDARD= none
21 VOPTS[py310]= PY39=OFF PY310=ON
22 VOPTS[py39]= PY39=ON PY310=OFF
24 DISTNAME= cachetools-5.2.0.dist-info
28 [PY39].USES_ON= python:py39,wheel
30 [PY310].USES_ON= python:py310,wheel
32 [FILE:3164:descriptions/desc.single]
34 ========================================================================
36 :alt: Latest PyPI version
40 :alt: Documentation build status
44 :alt: Libraries.io SourceRank
48 :alt: Code style: black
50 This module provides various memoizing collections and decorators,
51 including variants of the Python Standard Library's `@lru_cache`_
54 .. code-block:: python
56 from cachetools import cached, LRUCache, TTLCache
58 # speed up calculating Fibonacci numbers with dynamic programming
61 return n if n < 2 else fib(n - 1) + fib(n - 2)
63 # cache least recently used Python Enhancement Proposals
64 @cached(cache=LRUCache(maxsize=32))
66 url = 'http://www.python.org/dev/peps/pep-%04d/' % num
67 with urllib.request.urlopen(url) as s:
70 # cache weather data for no longer than ten minutes
71 @cached(cache=TTLCache(maxsize=1024, ttl=600))
72 def get_weather(place):
73 return owm.weather_at_place(place).get_weather()
75 For the purpose of this module, a *cache* is a mutable_ mapping_ of a
76 fixed maximum size. When the cache is full, i.e. by adding another
77 item the cache would exceed its maximum size, the cache must choose
78 which item(s) to discard based on a suitable `cache algorithm`_.
80 This module provides multiple cache classes based on different cache
81 algorithms, as well as decorators for easily memoizing function and
85 ------------------------------------------------------------------------
87 cachetools is available from PyPI_ and can be installed by running::
89 pip install cachetools
91 Typing stubs for this package are provided by typeshed_ and can be
92 installed by running::
94 pip install types-cachetools
97 ------------------------------------------------------------------------
105 ------------------------------------------------------------------------
107 - asyncache_: Helpers to use cachetools with async functions
108 - CacheToolsUtils_: Cachetools Utilities
109 - `kids.cache`_: Kids caching library
110 - shelved-cache_: Persistent cache for Python cachetools
113 ------------------------------------------------------------------------
115 Copyright (c) 2014-2022 Thomas Kemmer.
117 Licensed under the `MIT License`_.
120 https://docs.python.org/3/library/functools.html#functools.lru_cache
121 .. _mutable: https://docs.python.org/dev/glossary.html#term-mutable
122 .. _mapping: https://docs.python.org/dev/glossary.html#term-mapping
123 .. _cache algorithm: https://en.wikipedia.org/wiki/Cache_algorithms
125 .. _PyPI: https://pypi.org/project/cachetools/
126 .. _typeshed: https://github.com/python/typeshed/
127 .. _Documentation: https://cachetools.readthedocs.io/
128 .. _Issue tracker: https://github.com/tkem/cachetools/issues/
129 .. _Source code: https://github.com/tkem/cachetools/
131 https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst
132 .. _MIT License: https://raw.github.com/tkem/cachetools/master/LICENSE
136 f9f17d2aec496a9aa6b76f53e3b614c965223c061982d434d160f930c698a9db 9292 cachetools-5.2.0-py3-none-any.whl