redlock-plus 0.1.6

Creator: bradpython12

Last updated:

0 purchases

redlock-plus 0.1.6 Image
redlock-plus 0.1.6 Images

Languages

Categories

Add to Cart

Description:

redlockplus 0.1.6

Redlock+ is an up to date, feature complete implementation of the Redlock Algorithm
It’s a spiritual successor to glasslion/redlock, which is no longer maintained.

Features

Compliant with the standard library Lock
and RLock so it can be used as a drop-in replacement
Complete implementation of the Redlock Algorithm
Autoextend functionality to make redlock safer and easier to use
Well tested (Python 3.6+, PyPy3)
Type hinted



Documentation
https://redlock-plus.readthedocs.io/en/latest/


Installation
Redlock+ is available on PyPi:
pip install redlock-plus


Basic usage
from redlock_plus import Lock

redis_instance_configs = [
{"url": "redis://localhost/0"},
{"url": "redis://example.com:1234/1"},
{"url": "redis://other.host:5678/2"},
]

with Lock("my_resource", redis_instance_configs):
# do work
or speed up things for repeated use using the factory
from redlock_plus import LockFactory

redlock_factory = LockFactory(
[
{"url": "redis://localhost/0"},
{"url": "redis://localhost/1"},
{"url": "redis://localhost/2"},
]
)

with redlock_factory("my_resource"):
# do work

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.