Very simple asynchronous tasks for Python.
Very Simple Asynchronous Tasks
A small library that allows asynchronous tasks to be executed. Useful for web applications when you need a task to run in the background. The API is modelled loosely on Celery. The library makes use of the Python multiprocessing library to run tasks in the background.
Install the library
pip install vsat
Create and run task.
In : from vsat.task import task In : from vsat.worker import WorkerPool In : worker_pool = WorkerPool.init(num_workers=1) In : @task ...: def my_function(arg1): ...: return arg1 * arg1 ...: In : worker_pool.start() In : result = my_function.apply_async(2) In : print result.get_result(block=True) 4
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.