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.

Source Distribution

vsat-0.0.7.tar.gz (4.3 kB view details)

Uploaded Source

File details

Details for the file vsat-0.0.7.tar.gz.

File metadata

  • Download URL: vsat-0.0.7.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for vsat-0.0.7.tar.gz
Algorithm Hash digest
SHA256 71a0a3f42c481cacba5b0ae6179f6fa1f4b2e45872d26457cd2eab231e85b5e4
MD5 24c669c158cddfd29d258ed53406d75b
BLAKE2b-256 bfa7f049adcc3a08f02caed07f9b1bd3e32ed263c31379cf358c265f3531b8ec

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page