A context manager that creates savepoints, avoiding recalculating expensive parts of the code.
An example:
from savepoint import SavePoint
a = 10
b = 20
# do some expensive calculation here
with SavePoint("stuff.p"):
print "doing stuff"
a += 10
c = 30
print a, b, c
The first time the code is ran the with block is executed, and the modifed scope is pickled to stuff.p. Subsequent calls will update the global scope from the pickle file, and skip the block completely.
Metadata
Release files for savepoint 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| savepoint-0.1.tar.gz | 2.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| savepoint-0.1-py2.7.egg | Legacy Egg format | - | - | Details |
Total release size: 5.1 kB
Release files / savepoint-0.1.tar.gz
| Download URL | savepoint-0.1.tar.gz |
|---|---|
| Size | 2.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
951b540d1326e19e7cda3d8b3b432e488f2259684a32411c887cac3a0c72e8a1
|
|
BLAKE2b-256 checksum How to use checksums |
ab1de0a0aab518476349815a93f80e9615bc98e1818f874641213ab9f3e4fea2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / savepoint-0.1-py2.7.egg
| Download URL | savepoint-0.1-py2.7.egg |
|---|---|
| Size | 2.9 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
0a935c474027f9ffc1093376dfd32d33bc8042cace532e80e345729e5e05410b
|
|
BLAKE2b-256 checksum How to use checksums |
649bd7bdf5831d16d1bc398b3f52a2453b174f979f6b89c2ade2d84f36726a16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |