{"id":24054833,"url":"https://github.com/lingfromsh/pyredis-distribution-lock","last_synced_at":"2026-05-17T14:34:31.155Z","repository":{"id":191147322,"uuid":"401966731","full_name":"lingfromSh/pyredis-distribution-lock","owner":"lingfromSh","description":"Distribution Lock implemented by python3 + redis","archived":false,"fork":false,"pushed_at":"2021-11-12T02:24:36.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T22:03:13.781Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lingfromSh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-09-01T07:12:04.000Z","updated_at":"2021-11-12T02:24:39.000Z","dependencies_parsed_at":"2023-08-28T11:13:43.854Z","dependency_job_id":null,"html_url":"https://github.com/lingfromSh/pyredis-distribution-lock","commit_stats":null,"previous_names":["lingfromsh/pyredis-distribution-lock"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lingfromSh/pyredis-distribution-lock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingfromSh%2Fpyredis-distribution-lock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingfromSh%2Fpyredis-distribution-lock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingfromSh%2Fpyredis-distribution-lock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingfromSh%2Fpyredis-distribution-lock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lingfromSh","download_url":"https://codeload.github.com/lingfromSh/pyredis-distribution-lock/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lingfromSh%2Fpyredis-distribution-lock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33142255,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-17T09:28:26.183Z","status":"ssl_error","status_checked_at":"2026-05-17T09:27:52.702Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-09T03:50:45.707Z","updated_at":"2026-05-17T14:34:31.127Z","avatar_url":"https://github.com/lingfromSh.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyRedis Distribution Lock\n\n## Introduction\n\nIt's just a simple implementation of distribution lock.\n\nWe could use redis distribution lock to manipulate some shared resources safely in distributed context.\n\n## Tests\n\nYou could quickly test\n\n```shell\npython3 -m tests.xxx\n```\n\n## Quick Start\n\nYou could take adventage of a redis distribution lock in a very simple way.\n\n```python3\nimport redis\nimport lock\n\nr = redis.Redis(host='localhost', port=6379, db=0)\n\n# if-else\ndef deduct_inventory(...):\n    lock = lock.RedisDistributionLock()\n    if lock.acquire(...):\n        ...\n\tlock.release()\n\n# with\ndef deduct_inventory(...):\n    with lock.RedisDistributionLock():\n        ...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flingfromsh%2Fpyredis-distribution-lock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flingfromsh%2Fpyredis-distribution-lock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flingfromsh%2Fpyredis-distribution-lock/lists"}