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 <https://github.com/jefersondaniel>
@reisraff <https://github.com/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.7.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for phulpy-1.0.7-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 350c606fd2fc7b6b87d93d1a686f4b850fe4ff63cf93e430031144739f1585f0 |
|
MD5 | 724f04800f939b37da135d4f768709a3 |
|
BLAKE2b-256 | 22bc91f6f41b607ae18c8af02cee3eb1fbd2a59ac7df825b6a3fbf6fc3e59ee9 |