Resolves dependencies into tiers suitable for parallel work
Project description
# paradeps
## Overview
This resolves dependencies into parallelizable execution tiers. For example, given the inputs:
a, b, c, d, f
Where a and b depend on f, this will return:
[{c,d,f}, {a,b}]
## Requirements
Python 3.10+
## Installation
pip install paradeps
Or download the *.whl files and install it with `pip install *.whl`.
## Usage
from paradeps import Dependent
class Item(Dep):
...
def process_items_in_parallel(items):
...
items = [Item() for i in range(5)]
items[0].add_dependency(items[2])
items[2].add_dependency(items[4])
tiers = resolve_deps(items)
for tier in tiers:
process_items_in_parallel(tier)
## License
Released under the terms of Affero GPL version 3.0 only. See `LICENSE.txt` for further details.
## Authors / Contact
Email mailto::leebraid@gmail.com[mailto::leebraid@gmail.com].
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.
Source Distribution
paradeps-0.1.1.tar.gz
(14.2 kB
view hashes)
Built Distribution
paradeps-0.1.1-py3-none-any.whl
(14.6 kB
view hashes)