Skip to main content

Distributed lock using Redis

Project description

A distributed lock using Redis. Inspired by Sherlock.


$ pip install bullock


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

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.5.tar.gz (2.1 kB view hashes)

Uploaded source

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