Ravenports generated: 22 May 2022 14:00
[ravenports.git] / bucket_34 / python-cachetools
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               python-cachetools
4 VERSION=                5.1.0
5 KEYWORDS=               python
6 VARIANTS=               py39 py310
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]
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            PYPIWHL/99/33/c605db9880c7bf6d58db6bb2953860b1927d28dd033d3bea82323d4e7b25
14 DISTFILE[1]=            cachetools-5.1.0-py3-none-any.whl:main
15 DF_INDEX=               1
16 SPKGS[py310]=           single
17 SPKGS[py39]=            single
18
19 OPTIONS_AVAILABLE=      PY39 PY310
20 OPTIONS_STANDARD=       none
21 VOPTS[py310]=           PY39=OFF PY310=ON
22 VOPTS[py39]=            PY39=ON PY310=OFF
23
24 DISTNAME=               cachetools-5.1.0.dist-info
25
26 GENERATED=              yes
27
28 [PY39].USES_ON=                         python:py39,wheel
29
30 [PY310].USES_ON=                        python:py310,wheel
31
32 [FILE:3182:descriptions/desc.single]
33 cachetools
34 ========================================================================
35
36    :alt: Latest PyPI version
37
38    :alt: Documentation build status
39
40    :alt: CI build status
41
42    :alt: Test coverage
43
44    :alt: License
45
46    :alt: Code style: black
47
48 This module provides various memoizing collections and decorators,
49 including variants of the Python Standard Library's `@lru_cache`_
50 function decorator.
51
52 .. code-block:: python
53
54    from cachetools import cached, LRUCache, TTLCache
55
56    # speed up calculating Fibonacci numbers with dynamic programming
57    @cached(cache={})
58    def fib(n):
59        return n if n < 2 else fib(n - 1) + fib(n - 2)
60
61    # cache least recently used Python Enhancement Proposals
62    @cached(cache=LRUCache(maxsize=32))
63    def get_pep(num):
64        url = 'http://www.python.org/dev/peps/pep-%04d/' % num
65        with urllib.request.urlopen(url) as s:
66            return s.read()
67
68    # cache weather data for no longer than ten minutes
69    @cached(cache=TTLCache(maxsize=1024, ttl=600))
70    def get_weather(place):
71        return owm.weather_at_place(place).get_weather()
72
73 For the purpose of this module, a *cache* is a mutable_ mapping_ of a
74 fixed maximum size.  When the cache is full, i.e. by adding another
75 item the cache would exceed its maximum size, the cache must choose
76 which item(s) to discard based on a suitable `cache algorithm`_.
77
78 This module provides multiple cache classes based on different cache
79 algorithms, as well as decorators for easily memoizing function and
80 method calls.
81
82 Installation
83 ------------------------------------------------------------------------
84
85 cachetools is available from PyPI_ and can be installed by running::
86
87   pip install cachetools
88
89 Typing stubs for this package are provided by typeshed_ and can be
90 installed by running::
91
92   pip install types-cachetools
93
94 Project Resources
95 ------------------------------------------------------------------------
96
97 - `Documentation`_
98 - `Issue tracker`_
99 - `Source code`_
100 - `Change log`_
101
102 Related Projects
103 ------------------------------------------------------------------------
104
105 - asyncache_: Helpers to use cachetools with async functions
106 - CacheToolsUtils_: Cachetools Utilities
107 - `kids.cache`_: Kids caching library
108 - shelved-cache_: Persistent cache for Python cachetools
109
110 License
111 ------------------------------------------------------------------------
112
113 Copyright (c) 2014-2022 Thomas Kemmer.
114
115 Licensed under the `MIT License`_.
116
117 .. _@lru_cache:
118 https://docs.python.org/3/library/functools.html#functools.lru_cache
119 .. _mutable: https://docs.python.org/dev/glossary.html#term-mutable
120 .. _mapping: https://docs.python.org/dev/glossary.html#term-mapping
121 .. _cache algorithm: https://en.wikipedia.org/wiki/Cache_algorithms
122
123 .. _PyPI: https://pypi.org/project/cachetools/
124 .. _typeshed: https://github.com/python/typeshed/
125 .. _Documentation: https://cachetools.readthedocs.io/
126 .. _Issue tracker: https://github.com/tkem/cachetools/issues/
127 .. _Source code: https://github.com/tkem/cachetools/
128 .. _Change log:
129 https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst
130 .. _MIT License: https://raw.github.com/tkem/cachetools/master/LICENSE
131
132 .. _asyncache: https://pypi.org/project/asyncache/
133
134
135 [FILE:112:distinfo]
136 4ebbd38701cdfd3603d1f751d851ed248ab4570929f2d8a7ce69e30c420b141c         9205 cachetools-5.1.0-py3-none-any.whl
137