Simple parallel, distributed and cluster computing
Project description
Raisin: To perform cluster work easily! =======================================
Project Philosophy
1.Resources usage
raisin wants to be as simple as possible. That’s why the code analysis and the resources management are automated. Also raisin uses a bunch of classes and functions default parameters that are suitable for most usages.
In a future version, raisin will be able to perform automatic parallelization, a little like ‘pydron’.
2.Resources sharing
Your comfort while you are offering resources is guaranteed. raisin is not intrusive, it uses your resources - RAM, CPU, fan noise and bandwidth - only if they are available. Naturally, you keep hands on the way you are sharing your resources (timetable, rate, …).
Resource sharing, including security, is graphically configurable. Simply run python -m raisin configure command.
Installation
From PyPI using pip:
sudo pip install --upgrade raisin
python -m raisin install
Development version from ‘framagit’:
git clone https://framagit.org/robinechuca/raisin
cd raisin
pip install -r requirements.txt
sudo python setup.py install
python -m raisin install
cd ..
rm -rf raisin
Basic examples
In [1]: import raisin
...:
...: def foo(x):
...: """Function long at execution."""
...: ...
...: return x**2
In [2]: p = raisin.Process(foo, args=(5,)) # More options.
...: p.start() # Hand back, parallel execution.
...: p.get() # Wait and return result.
Out[2]: 25
In [3]: list(raisin.map(foo, range(5))) # More options.
Out[3]: [0, 1, 4, 9, 16]
Main Functions
Cluster work, with automatic distribution, recording results and protocol resumption.
Package |
Basic Description |
---|---|
raisin.Map |
runs a function n times, one per each argument |
raisin.map |
same as python built-in ‘map’, but over a cluster |
raisin.Process |
executes the function in the background (similar to & unix command) |
raisin.process |
same as Process, but blocking |
raisin.Scan |
executes a function by scanning arguments |
raisin.scan |
like ‘Scan’ but blocking |
Serialization / Deserialization, with intercompatibility, encryption, compression and RAM saving.
Package |
Basic Description |
---|---|
raisin.dumps |
serialisation (to str) |
raisin.loads |
deserialisation (from str) |
raisin.dump |
serialisation (to file) |
raisin.load |
deserialisation (from file) |
raisin.serialize |
serialisation (to bytes) |
raisin.deserialize |
deserialisation (from bytes) |
raisin.copy |
real copy using serialization |
More tools.
Package |
Basic Description |
---|---|
raisin.tools.MergeGenerators |
asynchronous merge iterator |
raisin.tools.id |
retrieves lots of contextual information |
raisin.tools.Lock |
locks with possibility of mondial reach |
raisin.tools.Printer |
friendly display |
raisin.tools.timeout_decorator |
adds a timeout on any function |
raisin.tools.get_temperature |
gets CPU temperature |
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.