Skip to content

paul-krug/tools-mp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tools-mp

This Python library provides a convenient one-line multiprocessing option that can be used as follows:

from tools_mp import multiprocess

def any_function( arg_1, arg_2, ..., arg_n ):
	do something
	return result

args = [ 
	{
		'arg_1': arg_1,
		'arg_2': arg_2,
		...
		'arg_n': arg_n,
		} for arg_1, arg_2, ..., arg_n in arguments
	]

data = multiprocess(
	function = any_function,
	args = args,
	return_data = True,
	verbose = True,
	workers = 8,
	)

If verbose=True, the progress of the calculation will be visualized via the tqdm library. If workers=None (default) all available CPU cores will be used for processing.

Installation

pip install tools-mp

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages