Ravenports generated: 07 Jan 2024 05:04
[ravenports.git] / bucket_34 / python-cachetools
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               python-cachetools
4 VERSION=                5.3.2
5 KEYWORDS=               python
6 VARIANTS=               v11 v12
7 SDESC[v11]=             Extensible memoizing collections (3.11)
8 SDESC[v12]=             Extensible memoizing collections (3.12)
9 HOMEPAGE=               https://github.com/tkem/cachetools/
10 CONTACT=                Python_Automaton[python@ironwolf.systems]
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            PYPIWHL/a2/91/2d843adb9fbd911e0da45fbf6f18ca89d07a087c3daa23e955584f90ebf4
14 DISTFILE[1]=            cachetools-5.3.2-py3-none-any.whl:main
15 DF_INDEX=               1
16 SPKGS[v11]=             single
17 SPKGS[v12]=             single
18
19 OPTIONS_AVAILABLE=      PY311 PY312
20 OPTIONS_STANDARD=       none
21 VOPTS[v11]=             PY311=ON PY312=OFF
22 VOPTS[v12]=             PY311=OFF PY312=ON
23
24 DISTNAME=               cachetools-5.3.2.dist-info
25
26 GENERATED=              yes
27
28 [PY311].USES_ON=                        python:v11,wheel
29
30 [PY312].USES_ON=                        python:v12,wheel
31
32 [FILE:3164:descriptions/desc.single]
33 cachetools
34 ========================================================================
35
36    :alt: Latest PyPI version
37
38    :alt: CI build status
39
40    :alt: Documentation build status
41
42    :alt: Test coverage
43
44    :alt: Libraries.io SourceRank
45
46    :alt: License
47
48    :alt: Code style: black
49
50 This module provides various memoizing collections and decorators,
51 including variants of the Python Standard Library's `@lru_cache`_
52 function decorator.
53
54 .. code-block:: python
55
56    from cachetools import cached, LRUCache, TTLCache
57
58    # speed up calculating Fibonacci numbers with dynamic programming
59    @cached(cache={})
60    def fib(n):
61        return n if n < 2 else fib(n - 1) + fib(n - 2)
62
63    # cache least recently used Python Enhancement Proposals
64    @cached(cache=LRUCache(maxsize=32))
65    def get_pep(num):
66        url = 'http://www.python.org/dev/peps/pep-%04d/' % num
67        with urllib.request.urlopen(url) as s:
68            return s.read()
69
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()
74
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`_.
79
80 This module provides multiple cache classes based on different cache
81 algorithms, as well as decorators for easily memoizing function and
82 method calls.
83
84 Installation
85 ------------------------------------------------------------------------
86
87 cachetools is available from PyPI_ and can be installed by running::
88
89   pip install cachetools
90
91 Typing stubs for this package are provided by typeshed_ and can be
92 installed by running::
93
94   pip install types-cachetools
95
96 Project Resources
97 ------------------------------------------------------------------------
98
99 - `Documentation`_
100 - `Issue tracker`_
101 - `Source code`_
102 - `Change log`_
103
104 Related Projects
105 ------------------------------------------------------------------------
106
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
111
112 License
113 ------------------------------------------------------------------------
114
115 Copyright (c) 2014-2023 Thomas Kemmer.
116
117 Licensed under the `MIT License`_.
118
119 .. _@lru_cache:
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
124
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/
130 .. _Change log:
131 https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst
132 .. _MIT License: https://raw.github.com/tkem/cachetools/master/LICENSE
133
134
135 [FILE:112:distinfo]
136 861f35a13a451f94e301ce2bec7cac63e881232ccce7ed67fab9b5df4d3beaa1         9293 cachetools-5.3.2-py3-none-any.whl
137