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.0.tar.gz
(2.6 kB
view details)
Built Distribution
File details
Details for the file background-0.1.0.tar.gz
.
File metadata
- Download URL: background-0.1.0.tar.gz
- Upload date:
- Size: 2.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb1a9f3140fb2fbdc8d3b40d797bf3f4ae53b843aca63a3cd2d8c63982a77147 |
|
MD5 | a42c4edc5a83a0471919d655e3ee133a |
|
BLAKE2b-256 | 394cf2602b10b469a95caf2b601ab0bb5671adb77bfe21364816205e29f43d47 |
File details
Details for the file background-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: background-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 510482ab457a6e60d87491aaddf944f900eb4312c8934397ceb1d6c0f765e9cb |
|
MD5 | c200d77f83b51637ee7bafaf9b6bad7c |
|
BLAKE2b-256 | 86be9de7386afe732d0e9a3972741b712a100bb706bc2fc7e0526f558739da93 |