It does what it says it does.
Project description
This module makes it stupidly simple to run things in the background of your application, be it a CLI app, or a web app.
Basic Usage
import time import background @background.task def work(): # Do something expensive here. time.sleep(10) for _ in range(100): work()
Advanced Usage
import background # Use 40 background threads. background.n = 40 @background.task def work(): import time time.sleep(10) @background.callback def work_callback(future): print(future) for _ in range(100): work()
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
background-0.1.1.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for background-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f64df9b1f1d4f91603f16d25f79691fa87eff62244d631b8b69cf121396b725 |
|
MD5 | 0bcb8095a8a8ab12c5e32b0676a6aa0a |
|
BLAKE2b-256 | d5915bdb02c03859e835d2eacfa5b3f1d39a5d24cad2f3b30525e212ae3618b9 |