save-return
Save the return value of the decorated function to a versioned pickle file.
Save
import save_return
@save_return.save('value_of_pi')
def calc_pi():
return 4
pi = calc_pi()
This will pickle.save pi to ./data/save_return/value_of_pi/yyyymmdd_HHMMSS_MS_00000.pkl
If used inside a Jupyter notebook named x.ipynb,
it will instead save to ./x.ipynb.save_return/value_of_pi/yyyymmdd_HHMMSS_MS_00000.pkl
Use @save_return.save(..., save_dir="some-dir") to customize the save location.
pi = calc_pi()
Call it again will save pi to ./data/save_return/value_of_pi/yyyymmdd_HHMMSS_MS_00001.pkl
Load
The load function is just a wrapper around pickle:
pi = save_return.load('./data/save_return/value_of_pi/yyyymmdd_HHMMSS_MS_00000.pkl')
Metadata
Release files for save-return 0.2.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 | |
|---|---|---|---|---|
| save_return-0.2.0.tar.gz | 2.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| save_return-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 4.5 kB
Release files / save_return-0.2.0.tar.gz
| Download URL | save_return-0.2.0.tar.gz |
|---|---|
| Size | 2.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e72b6cab48fe06f8e4746e7ed149feb68a0d37a2649dd004c77e5745080510a7
|
|
BLAKE2b-256 checksum How to use checksums |
7e9fd2f1e9dcdee90f69d6fa8039b634c4d828e354377cd9f4700eaecef30672
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.3
|
Release files / save_return-0.2.0-py3-none-any.whl
| Download URL | save_return-0.2.0-py3-none-any.whl |
|---|---|
| Size | 2.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf7f7c3574103e6d70e071c4bc95f7deacd1fb88ad16bed20b20b788bf1ec59b
|
|
BLAKE2b-256 checksum How to use checksums |
163cf94250b69cce0914dd25860911d31de8e439080ed4b5d0ecd2f704ef8b97
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.12.3
|
Security for save-return 0.2.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.