Comparison
backports.cached-property vs cached_method vs methodtools vs zope.cachedescriptors
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
cached_property() - computed once per instance, cached as attribute
Likely abandoned. No release or commit for years (last release over 4 years ago).
pip install backports-cached-propertyThe equivalent of cached_property for methods
Likely abandoned. No release or commit for years (last release over 5 years ago).
pip install cached-methodExpand standard functools to methods
Slowing down. Last release over 3 years ago, little activity since. Fine for existing code; think twice for a new project.
pip install methodtoolsMethod and property caching decorators
Low maintenance activity. Last release 15 months ago, commits in 2 of the last 26 weeks. Weaker on commit activity and recent releases.
pip install zope-cachedescriptorsIn short
- backports.cached-property looks abandoned: avoid it for new projects.
- cached_method looks abandoned: avoid it for new projects.
- methodtools is slowing down (last release over 3 years ago): fine for existing code, risky for a new project.
- zope.cachedescriptors is the most used: 105.3K downloads a month.
- zope.cachedescriptors also has the best Pythie’s Index (38).
Side by side
| Metric | backports.cached-property | cached_method | methodtools | zope.cachedescriptors |
|---|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 15 | 14 |