Skip to main content

Distributed calculation framework

Project description

Mona

build coverage python pypi commits since last commit license code style

Mona is a distributed calculation framework that turns normal execution of Python functions into a graph of tasks. Each task is hashed by the code of its function and its inputs, and the result of each executed task is cached. The cache can be stored persistently in an SQLite database. Tasks and their results can be exchanged between different machines via SSH.

Installing

Install and update using Pip.

pip install -U mona

Links

A simple example

from mona import Rule, Session

@Rule
async def total(xs):
    return sum(xs)

@Rule
async def fib(n):
    if n < 2:
        return n
    return total([fib(n - 1), fib(n - 2)])

with Session() as sess:
    sess.eval(fib(5))
    dot = sess.dot_graph()
dot.render(view=True)

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

mona-0.1.0.tar.gz (45.5 kB view hashes)

Uploaded Source

Built Distribution

mona-0.1.0-py3-none-any.whl (163.3 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