Python utility for easy multiprocessing + logging.
Project description
EasyMP
Easy multiprocessing and logging (SimpleMP) provides a solution for the two problems:
- Logging while using python multiprocessing.
- Stopping spawned processes using CTRL+C.
Install
pip install easymp
Example
from easymp import parallel, addlogging, execute
@addlogging
def square(x):
logger.info("Square: %d" % x)
return x * x
@addlogging
@parallel
def process(x):
y = square(x)
logger.info("Input %d, output %d." % (x, y))
return True
if __name__ == "__main__":
execute(process, it=range(20), nprocs=3)
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
easymp-0.1.7.tar.gz
(3.4 kB
view hashes)
Built Distribution
easymp-0.1.7-py3-none-any.whl
(3.7 kB
view hashes)