Skip to content

SnoParallel

This package aims to simplify parallelism with Python by providing an intuitive interface to the multiprocessing module. Users do need to worry about managing queues, processes, and access to memory, this is being taken care of safely.

Installation

The package can be installed easily with pip:

pip install snoparallel

Getting started

The code snippet below gives an introduction to parallelized workflows with the SnoParallel package:

from snoparallel import Manager


def target(work_item: str) -> None:
    print(work_item)


def main() -> None:
    manager = Manager(workers=2)

    for work_item in range(3):
        manager.add_work(target=target, work_item=work_item)

    manager.wait(timeout=10)


if __name__ == "__main__":
    main()

For details about more advanced workflows, see the tutorials page. The full code documentation can be found on the reference page.