No project description provided
Project description
Result Vault
Python module for persisting results of computation in a database. It is desinged mainly for storing results from experiments, not for usage as cache. Therefore it supports data quering and not features like time-to-live.
from revault import computation, Store
@computation
def my_computation(x, y):
return x + y
with Store("sqlite:///path/to/db"):
assert my_computation(10, 20) == 30 # the function my_computation is performed
assert my_computation(10, 20) == 30 # the result is taken from DB
assert my_computation.load(10, 20) == 30 # load from DB, fails if not exists
my_computation(10, 20, replica=1) # call the function again and store the results
my_computation(10, 20, replica=2) # call the function again and store the results
assert my_computation.load_replicas(10, 20) == [30, 30, 30] # Load all replicas for given call
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
revault-0.2.0.tar.gz
(6.5 kB
view details)
Built Distribution
File details
Details for the file revault-0.2.0.tar.gz
.
File metadata
- Download URL: revault-0.2.0.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-35-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0bbc47a664c6f549fbe2ac44b70565cf6bcdb903ee01dc4c7d24b6da3206d42 |
|
MD5 | 634f59288bcf54de0872bd63ed431940 |
|
BLAKE2b-256 | a880d11ea0e66ce84a6709d55c991ec26274b8078c0ced84b76b95b5ac53939e |
File details
Details for the file revault-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: revault-0.2.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.12 Linux/6.5.0-35-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d48df940874485b3299cc29473064249d49681c70d51b57f6beef91199e81b28 |
|
MD5 | 788208fc6a3abaedea30a905277f6d97 |
|
BLAKE2b-256 | b1856fde0550ffe017fb557a1d4402eb1531c2d4f7e753fb6f8714e949eab5b7 |