Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

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

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
background-0.1.1-py2.py3-none-any.whl (3.0 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Sep 3, 2017
background-0.1.1.tar.gz (2.7 kB) Copy SHA256 hash SHA256 Source None Sep 3, 2017

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page