Skip to main content

Lets doit read tasks defined using classes, decorated functions or function calls.

Project description

Lets doit read tasks defined using classes, decorated functions or function calls.

A sample dodo.py file:

from letsdoit import TaskBase, task

# Define a task using a decorator.
@task(file_dep=['dodo.py'])
def simple():
    print "hi"

# By calling a function.
compile = task(actions=['cc -c main.c'],
               file_dep=["main.c", "defs.h"],
               targets=['main.o'],
              )

# A class with a run() method
class hello(TaskBase):
    """Hello from Python."""
    targets = ['hello.txt']

    def run(self):
        with open(self.targets[0], "a") as output:
            output.write("Hello world.")

# A class with a list of actions.
class checker(TaskBase):
    """Run pyflakes."""
    actions = ['pyflakes letsdoit.py']
    file_dep = ['letsdoit.py']

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

letsdoit-0.1.tar.gz (1.6 kB view details)

Uploaded Source

File details

Details for the file letsdoit-0.1.tar.gz.

File metadata

  • Download URL: letsdoit-0.1.tar.gz
  • Upload date:
  • Size: 1.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for letsdoit-0.1.tar.gz
Algorithm Hash digest
SHA256 0ca44e6b7e99e99d5fd9c2880eaccedb0a7c359695b6045bdc046ce341d51623
MD5 7ba71e2b64fc4d070923c1a186700d49
BLAKE2b-256 5d742df69b846eb09bfaf91e1d7355dc9dcc9b68274cd3e3600964c890ae2ba2

See more details on using hashes here.

Supported by

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