cachedprop
cached property method decorator
Demo
from cachedprop import cpd
class LabRat:
def __init__(self) -> None:
self._hp = None
def expensive_hp_getter(self) -> int:
...
@cpd
def hp(self):
return self.expensive_hp_getter()
rat = LabRat()
print(rat.hp) # expensive_hp_getter is called, value gets "cached", prints value
print(rat.hp) # prints "cached" value only.
Metadata
Release files for cachedprop 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cachedprop-0.1.0.tar.gz | 1.6 kB | Without provenance | Details for cachedprop-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cachedprop-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for cachedprop-0.1.0-py3-none-any.whl |
Total release size: 3.6 kB
Release files / cachedprop-0.1.0.tar.gz
| Download URL | cachedprop-0.1.0.tar.gz |
|---|---|
| Size | 1.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae50077b1fa204e9932d76a9284d800859225d0177edb8312c5dd5ef09863eb1
|
|
BLAKE2b-256 checksum How to use checksums |
71bb5f0f6884a8ee716d72ad4f5f78dd808b29e3394c8c557c49167105d0e09b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.11 CPython/3.6.3 Linux/4.15.0-44-generic
|
Release files / cachedprop-0.1.0-py3-none-any.whl
| Download URL | cachedprop-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7827459f269b7c8d649c9c88441b452fabc32cdb2747aed500394b22a74a5fae
|
|
BLAKE2b-256 checksum How to use checksums |
15e2dece11e6b4f37c99cf85407b1531e8b64d3072e4a70ce04fe952e65a8cb7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.11 CPython/3.6.3 Linux/4.15.0-44-generic
|
Security for cachedprop 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.