Skip to main content

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


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 details)

Uploaded Source

Built Distribution

background-0.1.1-py2.py3-none-any.whl (3.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file background-0.1.1.tar.gz.

File metadata

  • Download URL: background-0.1.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for background-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b2fb684c150aaf1c4716686e7bd0e81a5c13db1852e7af48c01b98a3486a84c6
MD5 a95ea2464137f49d134e70444ba496ad
BLAKE2b-256 70aa3f05d4b9af2ffceff988d54e68217d511ef629d61aac99094d526054c416

See more details on using hashes here.

File details

Details for the file background-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for background-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8f64df9b1f1d4f91603f16d25f79691fa87eff62244d631b8b69cf121396b725
MD5 0bcb8095a8a8ab12c5e32b0676a6aa0a
BLAKE2b-256 d5915bdb02c03859e835d2eacfa5b3f1d39a5d24cad2f3b30525e212ae3618b9

See more details on using hashes here.

Supported by

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