Skip to main content

Very simple asynchronous tasks for Python.

Project description

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.

Example

Install the library

pip install vsat

Create and run task.

In [1]: from vsat.task import task

In [2]: from vsat.worker import WorkerPool

In [3]: worker_pool = WorkerPool.init(num_workers=1)

In [4]: @task
   ...: def my_function(arg1):
   ...:     return arg1 * arg1
   ...:

In [5]: worker_pool.start()

In [6]: result = my_function.apply_async(2)

In [7]: print result.get_result(block=True)
4

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for vsat, version 0.0.8
Filename, size File type Python version Upload date Hashes
Filename, size vsat-0.0.8.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page