Skip to main content

Provide locks with interface similar to those from threading and multiprocessing, which are applicable in other situations.

Project description

locking

build statusview logs

  1. Overview
  2. Examples
  3. Installation

Overview

These locks provide a similar interface to those in the threading and multiprocessing modules with a different set of tradeoffs. These locks are useable by multiple different processes when those processes agree on a naming scheme. This can be used in order to allow multiple processes running on the same machine to semi-coordinate or in the case of the redis or dynamo backed locks multiple processes running on different machines to coordinate work. This provides a different type of coordination than multiple workers consuming from a single queue and can allow quickly prototyping a solution where workers attempt to grab a job and take a lock on it, grabbing another job if they fail at getting the lock. One benefit of this type of solution is that it allows running on spot hardware in the cloud since if a single job is dropped before it is completed the lock will soon expire and another worker will be able to grab that same piece of work.

Examples

SocketLock

# todo

FileLock

# todo

RedisLock

# todo

DynamoLock

# todo

Installation

From PyPI

# todo

From GitHub

python -m pip install --upgrade git+https://git@github.com/jbylund/locking.git

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

locking-1.1.4.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

locking-1.1.4-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file locking-1.1.4.tar.gz.

File metadata

  • Download URL: locking-1.1.4.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for locking-1.1.4.tar.gz
Algorithm Hash digest
SHA256 4d312d6ece7251232896b0cd2b2a199073f1ea8bd3f39cf2379a75b3bbb0a600
MD5 39c846776e849d96457069c703dc3161
BLAKE2b-256 03a5ae799e56f4815bc42b310c969cc5f1bca762300b532996d8089e07048fe8

See more details on using hashes here.

File details

Details for the file locking-1.1.4-py3-none-any.whl.

File metadata

  • Download URL: locking-1.1.4-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for locking-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 4d2720df8e11bbd437a159c040aacc1648e0eec9f4a674fa6a49590f1c437ea5
MD5 9236f6a225656cedb1c02a26d5b4251e
BLAKE2b-256 89d1afca105ec2855c97f2bb1f084f4ae6f8674bf0692891f6e76109746ff5bf

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