Comparison
cached-property vs lazy vs memoized-property
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-propertyLazy attributes for Python objects
Maintained. Last release 5 months ago, commits in 6 of the last 26 weeks. Weaker on release cadence and contributor spread.
$
pip install lazyA 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-propertyIn 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.
- lazy is the most used: 451.9K downloads a month.
- lazy also has the best Pythie’s Index (49).
Side by side
| Metric | cached-property | lazy | memoized-property |
|---|---|---|---|
| Pythie’s Index | Pythie’s Index: 15 | 49 |