Skip to main content

Distributed lock using Redis

Project description

A distributed lock using Redis. Inspired by Sherlock.

Installation

$ pip install bullock

Usage

from bullock import Bullock
lock = Bullock(host="redis-hostname", key="my-first-lock", ttl=3600)
lock.acquire(blocking=True)
# do critical work here
lock.release()

You can also use the with statement:

from bullock import Bullock
with Bullock(host="redis-hostname", key="my-first-lock", ttl=3600):
    # do critical work here

For more examples, see tests.

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

bullock-0.0.3.tar.gz (1.9 kB view details)

Uploaded Source

File details

Details for the file bullock-0.0.3.tar.gz.

File metadata

  • Download URL: bullock-0.0.3.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for bullock-0.0.3.tar.gz
Algorithm Hash digest
SHA256 71dffb040ed424869f9a533f1b7e2435881abde2626409f5a09f74b54de07d35
MD5 704e8f9910352bf493bd5fe24bde39c8
BLAKE2b-256 dfbefaa6523f04dcb0485ab7305524da050805efd964ef01eed967f21c706c6c

See more details on using hashes here.

Supported by

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