The task manager for python
Project description
The task manager for python
Why
Port of GulpJS for Python
Documentation
Usage
Install:
$ pip install phulpy
Create your phulpyfile.py (the configuration file, that describes all your tasks):
from phulpy import task, Output
@task
def default(phulpy):
def print_file(file):
Output.out(Output.colorize(
file.relative_path,
'green'
))
def print_src_class(src):
Output.out(src.__class__.__name__)
def if_phulpy_file(file):
return 'phulpyfile.py' in file.name
phulpy.src(['./*'], read=True) \
.pipe(phulpy.iterate(print_file)) \
.pipe(print_src_class) \
.pipe(phulpy.filter(if_phulpy_file)) \
.pipe(phulpy.iterate(print_file)) \
.pipe(phulpy.dest('./var'))
@task
def clean(phulpy):
phulpy.src(['./var/*']) \
.pipe(phulpy.clean())
@task
def do_nothing():
pass
Run:
Run the phulpy over the phulpyfile.py directory
$ phulpy --help
$ phulpy # Will run the `default` task
$ phulpy mytask # Will run the `mytask` task
$ phulpy --threads 4 mytask1 mytask2 # Will run the tasks simultaneously
By:
@jefersondaniel @reisraff
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
phulpy-1.0.5.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for phulpy-1.0.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e43ded5b5d91471fc5b6168fad8c5b5c55abea7e3ab78be1002a264bd43596fe |
|
MD5 | 0ae750f1f11d519bf8054736aaffa88a |
|
BLAKE2b-256 | 6f11d517799a3b5f962dd9d1bd8655e268e59f3e3d178aaa6283d244fe042643 |