Ravenports generated: 25 Jan 2021 03:05
[ravenports.git] / bucket_34 / python-cachetools
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               python-cachetools
4 VERSION=                4.2.1
5 KEYWORDS=               python
6 VARIANTS=               py38 py39
7 SDESC[py38]=            Extensible memoizing collections (PY38)
8 SDESC[py39]=            Extensible memoizing collections (PY39)
9 HOMEPAGE=               https://github.com/tkem/cachetools/
10 CONTACT=                Python_Automaton[python@ironwolf.systems]
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            PYPIWHL/bb/72/8df2e0dc991f1a1d2c6869404e7622e8ee50d80bff357dbb57c3df70305b
14 DISTFILE[1]=            cachetools-4.2.1-py3-none-any.whl:main
15 DF_INDEX=               1
16 SPKGS[py38]=            single
17 SPKGS[py39]=            single
18
19 OPTIONS_AVAILABLE=      PY38 PY39
20 OPTIONS_STANDARD=       none
21 VOPTS[py38]=            PY38=ON PY39=OFF
22 VOPTS[py39]=            PY38=OFF PY39=ON
23
24 DISTNAME=               cachetools-4.2.1.dist-info
25
26 GENERATED=              yes
27
28 [PY38].USES_ON=                         python:py38,wheel
29
30 [PY39].USES_ON=                         python:py39,wheel
31
32 [FILE:2980:descriptions/desc.single]
33 cachetools
34 ========================================================================
35
36    :alt: Latest PyPI version
37
38    :alt: Documentation build status
39
40    :alt: Travis CI build status
41
42    :alt: Test coverage
43
44    :alt: Libraries.io SourceRank
45
46    :alt: License
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`_.  In
77 general, a cache's size is the total size of its items, and an item's
78 size is a property or function of its value, e.g. the result of
79 ``sys.getsizeof(value)``.  For the trivial but common case that each
80 item counts as 1, a cache's size is equal to the number of its
81 items, or ``len(cache)``.
82
83 Multiple cache classes based on different caching algorithms are
84 implemented, and decorators for easily memoizing function and method
85 calls are provided, too.
86
87 Installation
88 ------------------------------------------------------------------------
89
90 cachetools is available from PyPI_ and can be installed by running::
91
92   pip install cachetools
93
94 Project Resources
95 ------------------------------------------------------------------------
96
97 - `Documentation`_
98 - `Issue tracker`_
99 - `Source code`_
100 - `Change log`_
101
102 License
103 ------------------------------------------------------------------------
104
105 Copyright (c) 2014-2021 Thomas Kemmer.
106
107 Licensed under the `MIT License`_.
108
109 .. _@lru_cache:
110 http://docs.python.org/3/library/functools.html#functools.lru_cache
111 .. _mutable: http://docs.python.org/dev/glossary.html#term-mutable
112 .. _mapping: http://docs.python.org/dev/glossary.html#term-mapping
113 .. _cache algorithm: http://en.wikipedia.org/wiki/Cache_algorithms
114
115 .. _PyPI: https://pypi.org/project/cachetools/
116 .. _Documentation: https://cachetools.readthedocs.io/
117 .. _Issue tracker: https://github.com/tkem/cachetools/issues/
118 .. _Source code: https://github.com/tkem/cachetools/
119 .. _Change log:
120 https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst
121 .. _MIT License: http://raw.github.com/tkem/cachetools/master/LICENSE
122
123
124 [FILE:112:distinfo]
125 1d9d5f567be80f7c07d765e21b814326d78c61eb0c3a637dffc0e5d1796cb2e2        12003 cachetools-4.2.1-py3-none-any.whl
126