--- id: redlock-py version: "1.0.8" license: UNKNOWN license_treatment: permissive maintenance: abandoned --- # redlock-py — Redis locking mechanism License: permissive · Maintenance: abandoned · Downloads: 246.9K/mo ## What it is and what it does redlock-py is a Python implementation of the Redlock distributed lock algorithm, which coordinates access to shared resources across multiple Redis instances. You create a lock manager by pointing it at one or more Redis servers, then call lock() with a resource name and validity duration in milliseconds to acquire a lock, and unlock() to release it. The lock manager returns either False if acquisition failed or a named tuple with the lock's validity period, resource name, and a random key for safe reclamation. The package has no runtime dependencies and is straightforward to integrate into applications that need cross-process or cross-machine synchronization. However, it is abandoned—the last release was 2016-03-08 and the declared Python support only extends to 3.4. The author includes a disclaimer that the algorithm is a proposal and was not formally analyzed, so you should understand the algorithm's guarantees and limitations before relying on it in production. Use it for: - Coordinate job execution across multiple worker processes or machines to ensure only one instance runs a critical task at a time. - Prevent race conditions when multiple application instances need to update a shared resource in a database or external system. - Implement a distributed mutex for protecting access to a limited resource such as a file, API quota, or database connection pool. - Build a distributed task scheduler that ensures a scheduled job runs on only one node in a cluster. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Implements Redis-based distributed locks using the Redlock algorithm, allowing you to acquire and release locks across multiple Redis instances for coordinating access to shared resources. No. The package is abandoned with last release 2016-03-08 and Python support declared only up to 3.4, creating serious compatibility and maintenance risk. While the MIT license is permissive and there are no known vulnerabilities, the lack of updates and uncertain behavior on modern Python versions makes it unsuitable for new projects. Consider a maintained alternative for production use. ## Install pip install redlock-py uv add redlock-py poetry add redlock-py ## Installing redlock-py Before you install: High install friction despite no runtime dependencies. The package is abandoned—last release was 2016-03-08, over 3811 days ago. Python version support declared only up to 3.4, making compatibility with modern Python versions uncertain. License in practice: Licensed under MIT (permissive), so you can use, modify, and distribute the code freely with minimal restrictions. Quickstart: from redlock import Redlock dlm = Redlock([{"host": "localhost", "port": 6379, "db": 0}]) my_lock = dlm.lock("my_resource_name", 1000) if my_lock: dlm.unlock(my_lock) Requires a running Redis instance accessible at the configured host and port; the algorithm is a proposal and was not formally analyzed, so review the implementation before production use. Verify before relying: - Whether the package works reliably with Python versions beyond 3.4 despite classifier claims. - Current state of the upstream repository and whether it has been superseded by a maintained fork. - Whether the Redlock algorithm implementation matches current best practices or has known limitations. ## Package facts - License: UNKNOWN (permissive) - Python support: unspecified - Install friction: high - Maintenance: abandoned - Downloads: 246.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags redis distributed locks, redlock algorithm python, redis locking mechanism, distributed lock manager, redis resource locking, concurrent access control redis, multi-instance redis locks, distributed-locking, redis, abandoned [View on SkillFed](https://skillfed.io/packages/redlock-py) · [View on PyPI](https://pypi.org/project/redlock-py/)