redlock
Distributed locks with Redis
Decision gist · record as of 2026-08-14
No. While the package implements a sound algorithm and has no known vulnerabilities, it is abandoned (last release 2015-12-21) and targets Python 2 and Python 3.2–3.4. Compatibility with modern Python versions is unverified, and the lack of maintenance means bugs or security issues discovered in the future will not be addressed. For new projects, consider actively maintained alternatives or a more recent RedLock implementation.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires one or more Redis servers to be running and accessible; by default connects to 127.0.0.1:6379.
- Multiple independent Redis masters (not replicated) are needed for the algorithm to provide safety guarantees.
- Low friction to install.
License · maintenance · safety
MIT (permissive) — MIT license is permissive and imposes no restrictions on use, modification, or redistribution in proprietary or open-source projects.
last release 2015-12-21 (3889 days) · last repo commit 2020-05-30 · 215 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 160,777 downloads/mo, #10,651 on PyPI
Alternatives
Verify before relying
from redlock import RedLock
with RedLock("my_lock"):
# Critical section protected by distributed lock
pass- Whether the package works reliably with modern Python versions (3.8+) despite targeting only up to 3.4
- Current state of the GitHub repository and whether it accepts pull requests or has been superseded
- Whether redis-py dependency is implicitly required and what version constraints apply
What it is and what it does
RedLock is a Python implementation of the RedLock distributed locking algorithm, designed to coordinate access to shared resources across multiple independent Redis nodes. Unlike single-master Redis lock libraries, it addresses the race condition that occurs when a Redis master crashes before replicating a lock acquisition to its slave—by requiring a client to acquire the lock on a majority of independent Redis instances, it ensures safety even when individual nodes fail.
The package provides a threading.Lock-compatible API with both explicit acquire/release methods and context manager support, making it straightforward to protect critical sections in distributed systems. It also includes a RedLockFactory for efficiently reusing Redis client connections across multiple locks. However, the package has not been maintained since 2015 and targets Python 2 and early Python 3 versions, raising concerns about compatibility with current Python environments.
Use it for
- Coordinate exclusive access to a shared resource across multiple application instances running on different machines.
- Prevent duplicate job execution in a distributed task queue or scheduler when multiple workers might pick up the same task.
- Protect critical sections in microservices that need to ensure only one service instance performs a time-sensitive operation at a time.
- Implement distributed mutual exclusion for database migrations or schema updates across a cluster without requiring a central lock server.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
No.
While the package implements a sound algorithm and has no known vulnerabilities, it is abandoned (last release 2015-12-21) and targets Python 2 and Python 3.2–3.4. Compatibility with modern Python versions is unverified, and the lack of maintenance means bugs or security issues discovered in the future will not be addressed. For new projects, consider actively maintained alternatives or a more recent RedLock implementation.
Install
redlock on PyPI
Before you install
Low friction to install. However, the package is abandoned—last release was 2015-12-21 and last commit 2020-05-30. It targets Python 2 and early Python 3 versions (up to 3.4), so compatibility with modern Python environments is uncertain.
Requires one or more Redis servers to be running and accessible; by default connects to 127.0.0.1:6379. Multiple independent Redis masters (not replicated) are needed for the algorithm to provide safety guarantees.
License in practice
MIT license is permissive and imposes no restrictions on use, modification, or redistribution in proprietary or open-source projects.
Quickstart
from redlock import RedLock
with RedLock("my_lock"):
# Critical section protected by distributed lock
pass
Verify before relying
- Whether the package works reliably with modern Python versions (3.8+) despite targeting only up to 3.4
- Current state of the GitHub repository and whether it accepts pull requests or has been superseded
- Whether redis-py dependency is implicitly required and what version constraints apply
Package facts
| License | MIT permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Abandoned 3,889 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 160,777 / month, #10,651 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 2Programming Language :: Python :: 2.6Programming Language :: Python :: 2.7Programming Language :: Python :: 3Programming Language :: Python :: 3.2Programming Language :: Python :: 3.3Programming Language :: Python :: 3.4 |
Evidence: redlock-1.2.0-py2-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “distributed locks redis”
- redlockImplements the RedLock algorithm to provide distributed locks across…
- redlock-pyImplements Redis-based distributed locks using the Redlock algorithm,…
- aioredlockImplements the Redlock distributed lock algorithm for asyncio,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Distributed Computing packages
gRPC Python is an HTTP/2-based RPC framework that enables you to define and call remote procedures across network boundaries using protocol buffers for serialization.
Install it if you need RPC communication in a distributed system or are integrating with existing gRPC services.
execnet lets you spawn and communicate with Python interpreters across local processes, remote hosts, and different platforms, using a simple API for task distribution and inter-process messaging.
However, the aging maintenance status (275 days since last release) means you should verify it meets your concurrency and performance needs before committing to a…
Cloudpickle extends Python's standard pickle module to serialize lambda functions, interactively-defined functions and classes, and other constructs that the default pickle cannot handle, making it suitable for cluster computing and remote code execution.
Install it if you need to serialize lambda functions, interactively-defined code, or non-standard Python constructs for cluster computing or distributed execution.
Provides a unified, open()-compatible Python API for streaming large files from remote storage (S3, GCS, Azure, HDFS, SFTP, HTTP) and local filesystems, with transparent compression support.
Install it if you work with large files on cloud storage or remote systems and want to avoid writing boilerplate around multiple SDKs.
Portalocker provides cross-platform file locking with support for exclusive and shared locks, plus Redis-based distributed locks and process-aware PID file locking.
Install it if you need file or process coordination; the optional extras (pywin32, redis) are only required for specific lock types.
Ray is a distributed computing framework that scales Python applications from a single machine to multi-node clusters, providing abstractions for parallel tasks, stateful actors, and shared objects.
See also aioredlock · python-redis-lock · redlock-py · python-dynamodb-lock · celery_once · fastrlock · celery-singleton · PyMySQLLock · readerwriterlock