Skip to main content

Bullock

A distributed lock using Redis. Inspired by Sherlock.

https://travis-ci.org/jbochi/bullock.svg?branch=master

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

Also supports using redis cluster:

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

For more examples, see tests.

Metadata

Release files for bullock 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bullock 1.0.0
File Size Uploaded Provenance Actions
bullock-1.0.0.tar.gz 2.2 kB Without provenance Details for bullock-1.0.0.tar.gz

Release files / bullock-1.0.0.tar.gz

Download URL bullock-1.0.0.tar.gz
Size 2.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f8b09c39a37339df462f25fb71f5630a046d5905982c8a8fcfd7bd890c92e1ef
BLAKE2b-256 checksum
How to use checksums
c33b359f7ab2eb5c983c9745ac2105dde89d7aad5762df20ac3dd44cea320d98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/2.7

Security for bullock 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page