rememberer
Rememberer is a tool to help your functions remember their previous results.
The advantage of this package compared to other memoization packages is that it will remember the result of the function even if you kill the program and restart it.
It will also remember the result even if you restart the python interpreter because it uses a pickle file to store the results.
Installation
pip install rememberer
Usage
from rememberer import rem
def add(a, b):
import time
time.sleep(3)
return a + b
rem(add, 1, b=2) # this will take 3 seconds
rem(add, 1, b=2) # this will take ~0 seconds
You can use it as a decorator as well:
from rememberer import rem_dec
@rem_dec
def add(a, b):
import time
time.sleep(3)
return a + b
add(1, b=2) # this will take 3 seconds
add(1, b=2) # this will take ~0 seconds
If you want to clear the cache, you can use the forget method:
from rememberer import forget
forget(add, 1, b=2)
Metadata
Release files for rememberer 0.1.6
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 |
|---|---|---|---|---|
| rememberer-0.1.6.tar.gz | 4.1 kB | Without provenance | Details for rememberer-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rememberer-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for rememberer-0.1.6-py3-none-any.whl |
Total release size: 8.4 kB
Release files / rememberer-0.1.6.tar.gz
| Download URL | rememberer-0.1.6.tar.gz |
|---|---|
| Size | 4.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f223acf28c07076dd526368da4f037f7f674ad82915e13fe20657bdf873b514b
|
|
BLAKE2b-256 checksum How to use checksums |
b020d791872b5202f0cc2a330b88a63cbafc490a1fc68273f9d5900fb77d2902
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / rememberer-0.1.6-py3-none-any.whl
| Download URL | rememberer-0.1.6-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0d77e29be21f5b5bcdc035cb6fb0668125ae243a5efb2fc18cb03f4a833210bb
|
|
BLAKE2b-256 checksum How to use checksums |
3583081e721ef8d65ce9d19afc36395ef5812aef801251397175b906f85b0bfd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Security for rememberer 0.1.6
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.