Skip to main content

A simple redis lock.

Project description


pip install simple-redis-lock


from simple_redis_lock import get_simple_lock
import your_redis_client

with get_imple_lock(your_redis_client, 'my_lock_name', ex=30) as lock:
    if lock:
        print('get the lock, and do something, finish release the lock')
        print('do not get lock, return')

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for simple-redis-lock, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size simple-redis-lock-0.1.2.tar.gz (1.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page