backports.cached-property
cached_property() - computed once per instance, cached as attribute
Decision gist · record as of 2026-08-14
Yes, if you need cached_property on Python 3.6 or 3.7. The package is stable, permissively licensed, and has no known vulnerabilities. Dormant maintenance is acceptable here because the backport targets a fixed API from Python 3.8—there is little reason for it to change. If you are already on Python 3.8+, use the standard library instead.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.6 or later.
- Does not work with classes using __slots__ without __dict__, or with metaclasses.
- Low install friction with a single wheel dependency.
License · maintenance · safety
MIT License (permissive) — MIT License (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
last release 2022-06-14 (1522 days) · last repo commit 2023-11-22 · 15 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 509,434 downloads/mo, #6,271 on PyPI
Alternatives
Verify before relying
pip install backports.cached-property
from backports.cached_property import cached_property
class DataSet:
@cached_property
def stdev(self):
return statistics.stdev(self._data)- Whether dormant maintenance (last commit 2023-11-22) poses a risk for future Python versions beyond 3.9.
- Real-world performance impact of caching overhead versus computation savings in typical use cases.
What it is and what it does
This package backports Python 3.8's cached_property descriptor to Python 3.6 and 3.7. It lets you decorate a method so its result is computed once and then stored as a regular instance attribute, avoiding recomputation on subsequent accesses. The decorator is useful for expensive computed properties that don't change during an instance's lifetime.
The implementation is minimal and closely follows Python 3.8's standard library version. It depends only on the typing module and installs as a single wheel with low friction. However, it has a known limitation: it requires instances to have a mutable __dict__ attribute, so it won't work with classes that define __slots__ without including __dict__, or with metaclasses.
Use it for
- Add caching to expensive statistical computations in data analysis classes.
- Backport cached_property to legacy codebases still running Python 3.6 or 3.7.
- Cache derived attributes in immutable-like objects where recomputation is wasteful.
- Simplify property definitions when you need both lazy evaluation and memoization.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need cached_property on Python 3.6 or 3.7.
The package is stable, permissively licensed, and has no known vulnerabilities. Dormant maintenance is acceptable here because the backport targets a fixed API from Python 3.8—there is little reason for it to change. If you are already on Python 3.8+, use the standard library instead.
Install
backports-cached-property on PyPI
Before you install
Low install friction with a single wheel dependency. Maintenance is dormant—last release was 2022-06-14 and no commits since 2023-11-22—but the package is marked Production/Stable and addresses a narrow, stable backport use case.
Requires Python 3.6 or later. Does not work with classes using __slots__ without __dict__, or with metaclasses.
License in practice
MIT License (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install backports.cached-property
from backports.cached_property import cached_property
class DataSet:
@cached_property
def stdev(self):
return statistics.stdev(self._data)
Verify before relying
- Whether dormant maintenance (last commit 2023-11-22) poses a risk for future Python versions beyond 3.9.
- Real-world performance impact of caching overhead versus computation savings in typical use cases.
Package facts
| License | MIT License permissive |
| Python support | Supports the current Python release >=3.6.0 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagetyping |
| Maintenance | Dormant 1,522 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 509,434 / month, #6,271 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python Modules |
Evidence: backports.cached_property-1.0.2-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “property caching python”
- backports.cached-propertyProvides the cached_property decorator for Python 3.6 and 3.7,…
- zope.cachedescriptorsProvides decorator-based caching for computed properties and methods…
- propcacheProvides fast cached-property decorators for Python 3.10+, with a…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also lazy · property-manager · zope.cachedescriptors · propcache · cached_method · async-property · backports.functools-lru-cache · django-cache-memoize