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 exec_1(phulpy):
def __on_stdout__(tick, stdin):
# Output.out(tick)
if '[yes]?' in tick:
stdin.write('yes\n')
def __on_stderr__(tick, stdin):
# Output.err(tick)
pass
def __on_finish__(sigint, stdout, stderr):
pass
command = phulpy.execute(
'ls -lah',
quite=False, # write on stdout and stdin, default True, needs to be handled
sync=False, # default True
on_stdout=__on_stdout__, # handle stdout
on_stderr=__on_stderr__, # handle stderr
on_finish=__on_finish__ # handle sigint
)
command.kill() # force stop command
@task
def exec_2(phulpy):
# when its is sync return a command with stdout, stderr, and sigint
command = phulpy.execute('ls -lah')
sigint = command.sigint
stdout = command.stdout
stderr = command.stderr
@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>
Metadata
Release files for phulpy 1.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| phulpy-1.0.10.tar.gz | 6.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| phulpy-1.0.10-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 14.1 kB
Release files / phulpy-1.0.10.tar.gz
| Download URL | phulpy-1.0.10.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8bb2f45ee10b4f659954269bace5d19a6831deb6ef09c9e813053cf74dad1dc
|
|
BLAKE2b-256 checksum How to use checksums |
0c1200ed166ce78e5b0c07841f13420288117a71574524445df3ceb579163218
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.7
|
Release files / phulpy-1.0.10-py2.py3-none-any.whl
| Download URL | phulpy-1.0.10-py2.py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
81ea642074722dfb7160631c11a4e0cd32e6af68ba13c62169b5a08c6ba7127e
|
|
BLAKE2b-256 checksum How to use checksums |
b464c6f9da124c8b1d8206953adb33fc15ddc39e4ea3962fad8519450d70cb52
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.7
|
Security for phulpy 1.0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.