Little process-based workers to do your bidding.
Project description
Little process-based workers to do your bidding.
Deliberately minimalist, you provide the number of workers to use & a list of commands (to be executed at the shell) & littleworkers will eat through the list as fast as it can.
Why littleworkers?
littleworkers shines when you just want to parallelize something without a lot of fuss & when you care more about the data/commands to be run.
Tiny source
Easy to queue a set of actions
Works with any runnable commands
Uses processes
Non-blocking
Seriously, it’s not a replacement for threading or multiprocessing if your application needs to share a ton of data with the children.
Usage
Usage is trivial:
from littleworkers import Pool # Define your commands. commands = [ 'ls -al', 'cd /tmp && mkdir foo', 'date', 'echo "Hello There."', 'sleep 2 && echo "Done."' ] # Setup a pool. Since I have two cores, I'll use two workers. lil = Pool(workers=2) # Run! lil.run(commands)
For more advanced uses, please see the API documentation.
Requirements
Python 2.6+
- author:
Daniel Lindsley
- updated:
2011/11/10
- version:
0.3.1
- license:
BSD
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
Built Distribution
File details
Details for the file littleworkers-0.3.2.tar.gz
.
File metadata
- Download URL: littleworkers-0.3.2.tar.gz
- Upload date:
- Size: 77.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f73cda5bed84e269c75def3d74d2764ac5742f97ebd8d6ad2747da077945dd6 |
|
MD5 | 576ef152387c99c0fb5e83f989e7fbfc |
|
BLAKE2b-256 | f72c0f35f9b28f645a50b0f23f1b44281a48bc1d059ba53d4acf41d826485001 |
File details
Details for the file littleworkers-0.3.2-py2.py3-none-any.whl
.
File metadata
- Download URL: littleworkers-0.3.2-py2.py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 701c6bee15a9ac8cc52758ad604fef4a034291f6951ab89aaf1469abdb1e9838 |
|
MD5 | ff12e1b41f13361a184bf6621d666d22 |
|
BLAKE2b-256 | 40f88b4870e0073edf572e042822eaae208f635ad384f22ffefbc714d25ae6c2 |