Skip to main content

doit comes from the idea of bringing the power of build-tools to execute any kind of task

doit can be uses as a simple Task Runner allowing you to easily define ad hoc tasks, helping you to organize all your project related tasks in an unified easy-to-use & discoverable way.

doit scales-up with an efficient execution model like a build-tool. doit creates a DAG (direct acyclic graph) and is able to cache task results. It ensures that only required tasks will be executed and in the correct order (aka incremental-builds).

The up-to-date check to cache task results is not restricted to looking for file modification on dependencies. Nor it requires “target” files. So it is also suitable to handle workflows not handled by traditional build-tools.

Tasks’ dependencies and creation can be done dynamically during it is execution making it suitable to drive complex workflows and pipelines.

doit is build with a plugin architecture allowing extensible commands, custom output, storage backend and “task loader”. It also provides an API allowing users to create new applications/tools leveraging doit functionality like a framework.

doit is a mature project being actively developed for more than 10 years. It includes several extras like: parallel execution, auto execution (watch for file changes), shell tab-completion, DAG visualisation, IPython integration, and more.

Sample Code

Define functions returning python dict with task’s meta-data.

Snippet from tutorial:

def task_imports():
    """find imports from a python module"""
    for name, module in PKG_MODULES.by_name.items():
        yield {
            'name': name,
            'file_dep': [module.path],
            'actions': [(get_imports, (PKG_MODULES, module.path))],
        }

def task_dot():
    """generate a graphviz's dot graph from module imports"""
    return {
        'targets': ['requests.dot'],
        'actions': [module_to_dot],
        'getargs': {'imports': ('imports', 'modules')},
        'clean': True,
    }

def task_draw():
    """generate image from a dot file"""
    return {
        'file_dep': ['requests.dot'],
        'targets': ['requests.png'],
        'actions': ['dot -Tpng %(dependencies)s -o %(targets)s'],
        'clean': True,
    }

Run from terminal:

$ doit list
dot       generate a graphviz's dot graph from module imports
draw      generate image from a dot file
imports   find imports from a python module
$ doit
.  imports:requests.models
.  imports:requests.__init__
.  imports:requests.help
(...)
.  dot
.  draw

Project Details

license

The MIT License Copyright (c) 2008-2022 Eduardo Naufel Schettino

Release files for doit 0.36.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 doit 0.36.0
File Size Uploaded
doit-0.36.0.tar.gz 1.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for doit 0.36.0
File Interpreter ABI Platform
doit-0.36.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.5 MB

Release files / doit-0.36.0.tar.gz

Download URL doit-0.36.0.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
71d07ccc9514cb22fe59d98999577665eaab57e16f644d04336ae0b4bae234bc
BLAKE2b-256 checksum
How to use checksums
5a3666b7dea1bb5688ba0d2d7bc113e9c0d57df697bd3f39ce2a139d9612aeee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

Release files / doit-0.36.0-py3-none-any.whl

Download URL doit-0.36.0-py3-none-any.whl
Size 85.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ebc285f6666871b5300091c26eafdff3de968a6bd60ea35dd1e3fc6f2e32479a
BLAKE2b-256 checksum
How to use checksums
4483a2960d2c975836daa629a73995134fd86520c101412578c57da3d2aa71ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.36.0 This release

2 release files

0.34.2

2 release files

0.34.1

2 release files

0.34.0

2 release files

0.32.0

1 release file

0.31.1

2 release files

0.31.0

1 release file

0.30.3

1 release file

0.30.2

1 release file

0.30.1

1 release file

0.30.0

1 release file

0.29.0

1 release file

0.28.0

1 release file

0.27.0

1 release file

0.26.0

1 release file

0.25.0

1 release file

0.24.0

1 release file

0.23.0

1 release file

0.22.1

1 release file

0.22.0

1 release file

0.21.1

1 release file

0.21.0

1 release file

0.20.0

1 release file

0.19.0

1 release file

0.18.1

1 release file

0.18.0

1 release file

0.17.0

1 release file

0.16.1

1 release file

0.16.0

1 release file

0.15.0

1 release file

0.14.0

1 release file

0.13.0

1 release file

0.12.0

1 release file

0.11.0

1 release file

0.10.0

1 release file

0.9.0

1 release file

0.8.0

1 release file

0.7.0

1 release file

0.6.0

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

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