任务自动化工具。
da的Python项目详细描述
python中的轻量级任务自动化。在某些情况下,它可能是替代品 用于制造或织物等工具这比做起来容易,因为你能写 python中的任务。你不需要像需要织物时那样编译东西。 你甚至不需要安装任何软件包,只需下载它,然后像平常一样使用 python脚本:
$ wget https://bitbucket.org/ishalyapin/dapy/raw/master/da.py $ python da.py [taskname]
对于dev环境,最简单的方法是使用pip:
$ pip install da $ da [taskname]
在项目目录中创建da.task.py文件。例如,您希望自动化 您的django项目开发环境安装。
da.tasks.py:
def install(): """ echo this example demostrates how to download some staff from """ run("virtualenv python") run("python/bin/pip install -r requirements.txt") run("mkdir -p static/pencil") github_download("https://github.com/un1t/pencil/tarball/master", "static/pencil") def runserver(): """ Run django devserver """ run("python/bin/python manage.py runserver 0:8000")
运行任务:
$ da install $ da runserver