Ravenports generated: 21 Apr 2020 22:22
[ravenports.git] / bucket_34 / python-cachetools
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               python-cachetools
4 VERSION=                4.1.0
5 KEYWORDS=               python
6 VARIANTS=               py38 py37
7 SDESC[py37]=            Extensible memoizing collections (PY37)
8 SDESC[py38]=            Extensible memoizing collections (PY38)
9 HOMEPAGE=               https://github.com/tkem/cachetools/
10 CONTACT=                Python_Automaton[python@ironwolf.systems]
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            PYPI/c/cachetools
14 DISTFILE[1]=            cachetools-4.1.0.tar.gz:main
15 DF_INDEX=               1
16 SPKGS[py37]=            single
17 SPKGS[py38]=            single
18
19 OPTIONS_AVAILABLE=      PY38 PY37
20 OPTIONS_STANDARD=       none
21 VOPTS[py37]=            PY38=OFF PY37=ON
22 VOPTS[py38]=            PY38=ON PY37=OFF
23
24 DISTNAME=               cachetools-4.1.0
25
26 GENERATED=              yes
27
28 [PY37].USES_ON=                         python:py37
29
30 [PY38].USES_ON=                         python:py38
31
32 [FILE:2946: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: License
45
46 This module provides various memoizing collections and decorators,
47 including variants of the Python Standard Library's `@lru_cache`_
48 function decorator.
49
50 .. code-block:: python
51
52    from cachetools import cached, LRUCache, TTLCache
53
54    # speed up calculating Fibonacci numbers with dynamic programming
55    @cached(cache={})
56    def fib(n):
57        return n if n < 2 else fib(n - 1) + fib(n - 2)
58
59    # cache least recently used Python Enhancement Proposals
60    @cached(cache=LRUCache(maxsize=32))
61    def get_pep(num):
62        url = 'http://www.python.org/dev/peps/pep-%04d/' % num
63        with urllib.request.urlopen(url) as s:
64            return s.read()
65
66    # cache weather data for no longer than ten minutes
67    @cached(cache=TTLCache(maxsize=1024, ttl=600))
68    def get_weather(place):
69        return owm.weather_at_place(place).get_weather()
70
71 For the purpose of this module, a *cache* is a mutable_ mapping_ of a
72 fixed maximum size.  When the cache is full, i.e. by adding another
73 item the cache would exceed its maximum size, the cache must choose
74 which item(s) to discard based on a suitable `cache algorithm`_.  In
75 general, a cache's size is the total size of its items, and an item's
76 size is a property or function of its value, e.g. the result of
77 ``sys.getsizeof(value)``.  For the trivial but common case that each
78 item counts as 1, a cache's size is equal to the number of its
79 items, or ``len(cache)``.
80
81 Multiple cache classes based on different caching algorithms are
82 implemented, and decorators for easily memoizing function and method
83 calls are provided, too.
84
85 Installation
86 ------------------------------------------------------------------------
87
88 cachetools is available from PyPI_ and can be installed by running::
89
90   pip install cachetools
91
92 Project Resources
93 ------------------------------------------------------------------------
94
95 - `Documentation`_
96 - `Issue tracker`_
97 - `Source code`_
98 - `Change log`_
99
100 License
101 ------------------------------------------------------------------------
102
103 Copyright (c) 2014-2020 Thomas Kemmer.
104
105 Licensed under the `MIT License`_.
106
107 .. _@lru_cache:
108 http://docs.python.org/3/library/functools.html#functools.lru_cache
109 .. _mutable: http://docs.python.org/dev/glossary.html#term-mutable
110 .. _mapping: http://docs.python.org/dev/glossary.html#term-mapping
111 .. _cache algorithm: http://en.wikipedia.org/wiki/Cache_algorithms
112
113 .. _PyPI: https://pypi.org/project/cachetools/
114 .. _Documentation: https://cachetools.readthedocs.io/
115 .. _Issue tracker: https://github.com/tkem/cachetools/issues/
116 .. _Source code: https://github.com/tkem/cachetools/
117 .. _Change log:
118 https://github.com/tkem/cachetools/blob/master/CHANGELOG.rst
119 .. _MIT License: http://raw.github.com/tkem/cachetools/master/LICENSE
120
121
122 [FILE:102:distinfo]
123 1d057645db16ca7fe1f3bd953558897603d6f0b9c51ed9d11eb4d071ec4e2aab        22229 cachetools-4.1.0.tar.gz
124