Skip to main content

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


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 hashes)

Uploaded Source

Built Distribution

revault-0.2.0-py3-none-any.whl (7.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page