Skip to content
forked from Citi/parfun

Lightweight parallelisation library for Python

License

Notifications You must be signed in to change notification settings

sharpener6/parafun

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Citi

Citi/parafun

Lightweight parallelisation library for Python.


Parafun is a lightweight library providing helpers to make it easy to write and run a Python function in parallel and distributed systems.

The main feature of the library is its @parafun decorator that transparently executes standard Python functions following the map-reduce pattern:

from parafun import parafun
from parafun.combine.collection import list_concat
from parafun.partition.api import per_argument
from parafun.partition.collection import list_by_chunk

@parafun(
    split=per_argument(
        values=list_by_chunk
    ),
    combine_with=list_concat,
)
def list_pow(values: List[float], factor: float) -> List[float]:
    return [v**factor for v in values]

Features

  • Provides significant speedups to existing Python functions
  • Does not require any deep knowledge of parallel or distributed computing systems
  • Automatically estimates the optimal sub-task splitting (the partition size)
  • Automatically handles data transmission, caching and synchronization.
  • Supports various distributed computing backends, including Python's multiprocessing, Scaler or Dask.

Quick Start

The built-in Sphinx documentation contains detailed usage instructions, implementation details, and an exhaustive API reference.

Use the doc Make target to build the HTML documentation from the source code:

make doc

The documentation's main page can then ben found at docs/build/html/index.html.

Take a look at our documentation's quickstart tutorial to get more examples and a deeper overview of the library.

Contributing

Your contributions are at the core of making this a true open source project. Any contributions you make are greatly appreciated.

We welcome you to:

Please review our community contribution guidelines and functional contribution guidelines to get started 👍.

Code of Conduct

We are committed to making open source an enjoyable and respectful experience for our community. See CODE_OF_CONDUCT for more information.

License

This project is distributed under the Apache-2.0 License. See LICENSE for more information.

Contact

If you have a query or require support with this project, raise an issue. Otherwise, reach out to [email protected].

About

Lightweight parallelisation library for Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.8%
  • Other 1.2%