Skip to main content
OpenGRIS Parfun

Lightweight parallelization library for Python.

PyPI - Version


OpenGRIS Parfun is a lightweight library making it easy to write and run Python in parallel and distributed systems.

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

from typing import List

import parfun as pf


@pf.parallel(
    # parallelize by chunking the argument list (map)
    split=pf.per_argument(
        values=pf.py_list.by_chunk
    ),

    # merge the output by concatenating the results (reduce)
    combine_with=pf.py_list.concat,
)
def list_pow(values: List[float], factor: float) -> List[float]:
    """compute powers of a list of numbers"""
    return [v**factor for v in values]


if __name__ == "__main__":
    with pf.set_parallel_backend_context("local_multiprocessing"):  # use a local pool of processes
        print(list_pow([1, 2, 3], 2))  # runs in parallel, prints [1, 4, 9]

Features

  • Provides significant speedups to existing Python functions.
  • Only requires basic understanding of parallel and distributed computing systems.
  • Automatically estimates the optimal sub-task splitting strategy (the partition size).
  • Transparently handles data transmission, caching, and synchronization.
  • Supports various distributed computing backends:

Quick Start

Install Parfun directly from PyPI:

pip install opengris-parfun
pip install "opengris-parfun[pandas,scaler,dask]"  # with optional dependencies

The official documentation is available at citi.github.io/parfun/.

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

Alternatively, you can build the documentation from source:

cd docs
pip install -r requirements.txt
make html

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

Benchmarks

Parfun effectively parallelizes even short-duration functions.

For example, when running a short 0.28-second machine learning function on an AMD Epyc 7313 16-Core Processor, we found that Parfun provided an impressive 7.4x speedup. Source code for this experiment here.

Benchmark Results

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 functional contribution guidelines to get started 👍.

NOTE: Commits and pull requests to FINOS repositories will only be accepted from those contributors with an active, executed Individual Contributor License Agreement (ICLA) with FINOS OR contributors who are covered under an existing and active Corporate Contribution License Agreement (CCLA) executed with FINOS. Commits from individuals not covered under an ICLA or CCLA will be flagged and blocked by the (EasyCLA) tool. Please note that some CCLAs require individuals/employees to be explicitly named on the CCLA.

Need an ICLA? Unsure if you are covered under an existing CCLA? Email help@finos.org

Code of Conduct

Please see the FINOS Community Code of Conduct.

License

Copyright 2023 Citigroup, Inc.

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

SPDX-License-Identifier: Apache-2.0.

Contact

If you have a query or require support with this project, raise an issue. Otherwise, reach out to opensource@citi.com.

Metadata

Release files for opengris-parfun 7.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for opengris-parfun 7.4.0
File Size Uploaded
opengris_parfun-7.4.0.tar.gz 680.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for opengris-parfun 7.4.0
File Interpreter ABI Platform
opengris_parfun-7.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 727.3 kB

Release files / opengris_parfun-7.4.0.tar.gz

Download URL opengris_parfun-7.4.0.tar.gz
Size 680.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a9373a83aa47393596eda04c6c59f1188a62f3fdc6fef09fc30d12e90059053b
BLAKE2b-256 checksum
How to use checksums
5b439ba682b3357d95337fce57a90458b3832f9d5dc37e5f0b7d1bf8daff7cae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

Release files / opengris_parfun-7.4.0-py3-none-any.whl

Download URL opengris_parfun-7.4.0-py3-none-any.whl
Size 46.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18f183adee2c179fdede893f9515b227d9a9230df898d78e1820aace02eac627
BLAKE2b-256 checksum
How to use checksums
fadb65c2ee8520016ed527fb90c6b7bf27647467e29f51bcbb8a07bbfa4f0d5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

7.4.0 This release

2 release files

7.3.1

2 release files

7.3.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page