Skip to main content

Executes (long) actions in parallel, respecting dependencies between those actions

Project description

ActionTree is a Python (2.7 and 3.5+) library to execute (long) actions in parallel, respecting dependencies between those actions. You create a dependency graph of actions to be executed and then call the execute function on its root, specifying how many actions must be run in parallel and if errors should stop the execution.

It’s licensed under the MIT license. It’s available on the Python package index, its documentation and its source code are on GitHub.

Questions? Remarks? Bugs? Want to contribute? Open an issue!

https://img.shields.io/travis/jacquev6/ActionTree/master.svg https://img.shields.io/coveralls/jacquev6/ActionTree/master.svg https://img.shields.io/codeclimate/github/jacquev6/ActionTree.svg https://img.shields.io/scrutinizer/g/jacquev6/ActionTree.svg https://img.shields.io/pypi/dm/ActionTree.svg https://img.shields.io/pypi/l/ActionTree.svg https://img.shields.io/pypi/v/ActionTree.svg https://img.shields.io/pypi/pyversions/ActionTree.svg https://img.shields.io/pypi/status/ActionTree.svg https://img.shields.io/github/issues/jacquev6/ActionTree.svg https://img.shields.io/github/forks/jacquev6/ActionTree.svg https://img.shields.io/github/stars/jacquev6/ActionTree.svg

Quick start

Install from PyPI:

$ pip install ActionTree

Import:

>>> from ActionTree import execute
>>> from ActionTree.stock import CallSubprocess

Execute some action:

>>> link = CallSubprocess(["g++", "a.o", "b.o", "-o", "test"])
>>> link.add_dependency(CallSubprocess(["g++", "-c", "a.cpp", "-o", "a.o"]))
>>> link.add_dependency(CallSubprocess(["g++", "-c", "b.cpp", "-o", "b.o"]))
>>> report = execute(link, jobs=2)

And verify everything went well:

>>> report.is_success
True
>>> os.path.isfile("test")
True

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ActionTree-0.8.0.tar.gz (16.6 kB view details)

Uploaded Source

File details

Details for the file ActionTree-0.8.0.tar.gz.

File metadata

  • Download URL: ActionTree-0.8.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for ActionTree-0.8.0.tar.gz
Algorithm Hash digest
SHA256 3d50e617a24504dcaec756f419b619cfcb132ae26f4a629703ed829a8e647e98
MD5 1f24123338cccfe70caa21203c0f02cf
BLAKE2b-256 38ef147f5b26b4c080484ddcd0554f20feacaf88806ce20dc3970d5b85f35ac0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page