Comparison
cached-property vs memoized-property vs propcache vs zope.cachedescriptors
Maintenance, adoption and momentum side by side, from PyPI, GitHub and deps.dev data refreshed every day.
A decorator for caching properties in classes.
Slowing down. Last release over 2 years ago, little activity since. Fine for existing code; think twice for a new project.
pip install cached-propertyA simple python decorator for defining properties that only run their fget function once
Likely abandoned. No release or commit for years (last release over 10 years ago).
pip install memoized-propertyAccelerated property cache
Actively maintained. Last release 3 months ago, commits in 26 of the last 26 weeks. A safe choice.
pip install propcacheMethod 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
- cached-property is slowing down (last release over 2 years ago): fine for existing code, risky for a new project.
- memoized-property looks abandoned: avoid it for new projects.
- propcache is the most used: 557.4M downloads a month, 25× more than cached-property.
- propcache also has the best Pythie’s Index (82).
- propcache is growing fastest: downloads +12% over the last month.
- Safe default for a new project: propcache.
Side by side
| Metric | cached-property | memoized-property | propcache | zope.cachedescriptors |
|---|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 15 | 19 |