Skip to main content

Simple and clean background tasks.

Project description

Unblocked

Unblocked is a simple wrapper around multiprocessing.Process, giving users a nicer API as well as task results.

I wrote Unblocked for educational purposes, but it is also suited for actual use. If you are interested in the story behind Unblocked you can read it on my blog

Installation

$ pip install unblocked

Example

In the following snippet, calling example starts a background process and returns an unblocked.Result instance. This result can be retrieved with unblocked.Result.get

import unblocked

@unblocked.task
def example():
    return 5 * 5

if __name__ == "__main__":
    result = example()
    print(result.get(timeout=1))

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

unblocked-0.1.0.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

unblocked-0.1.0-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file unblocked-0.1.0.tar.gz.

File metadata

  • Download URL: unblocked-0.1.0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.1

File hashes

Hashes for unblocked-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8e491ad89e4bf250ad87a30cb6a94beee7c4936d905e0b870d677c8ea2f1ac6e
MD5 5cb87657dd46e0531249bc8103363e59
BLAKE2b-256 5b82b4fca84eb407b89c52045b9e0dbbec92b9e54d78cf69165f236bc7038f9e

See more details on using hashes here.

File details

Details for the file unblocked-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: unblocked-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.1

File hashes

Hashes for unblocked-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ddee741fcc17530d20f08132054f31a60e2fea58adac186d0a740a4ccf5d1f2d
MD5 d81a03e306628af28e1d66d996fdc544
BLAKE2b-256 451325ef070d3dcb799a9baa6b8155a07b95a63d49242cdfb9d6c1be8d410da5

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