{"id":40008912,"url":"https://github.com/raags/lockpick","last_synced_at":"2026-01-19T02:31:19.576Z","repository":{"id":62576603,"uuid":"361713000","full_name":"raags/lockpick","owner":"raags","description":"Lockpick is an utility for distributed locking using zookeeper. Its intended to be used in distributed environments where scripts need synchronization between runs.","archived":false,"fork":false,"pushed_at":"2021-04-27T12:59:51.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-02T22:02:45.969Z","etag":null,"topics":["distributed-lock","locking","zookeeper"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/raags.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-26T10:44:36.000Z","updated_at":"2024-01-19T10:28:12.000Z","dependencies_parsed_at":"2022-11-03T17:47:16.952Z","dependency_job_id":null,"html_url":"https://github.com/raags/lockpick","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/raags/lockpick","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raags%2Flockpick","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raags%2Flockpick/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raags%2Flockpick/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raags%2Flockpick/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/raags","download_url":"https://codeload.github.com/raags/lockpick/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/raags%2Flockpick/sbom","scorecard":{"id":757222,"data":{"date":"2025-08-11","repo":{"name":"github.com/raags/lockpick","commit":"21c9a9374684fdf55ae78982f6d23387c422bd09"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Code-Review","score":0,"reason":"Found 0/2 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-22T22:02:10.563Z","repository_id":62576603,"created_at":"2025-08-22T22:02:10.563Z","updated_at":"2025-08-22T22:02:10.563Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28558224,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T00:46:33.223Z","status":"online","status_checked_at":"2026-01-19T02:00:08.049Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["distributed-lock","locking","zookeeper"],"created_at":"2026-01-19T02:31:19.432Z","updated_at":"2026-01-19T02:31:19.557Z","avatar_url":"https://github.com/raags.png","language":"Python","readme":"# Lockpick\n\nLockpick is an utility for distributed locking using zookeeper. Its intended to be used in distributed environments where scripts need synchronization between runs.\n\n# Why Lockpick\n\nLockpick uses the kazoo library but provides following benefits over kazoo recipes :\n\n* Use non ephemeral zknode to allow *explicit* lock release\n* Exits with correct return codes\n* Correct signal Handling and cleanup\n* Retires and timeout\n\n## Usage\n\n```shell\n$ lockpick --help\nusage: lockpick [-h] [-s SERVERS] [-c CHROOT] [-i IDENTIFIER] [-v]\n                [-r RETRY_COUNT] [-p RETRY_SLEEP]\n                {lock,rlock,wlock,unlock,list} lock_path\n\nDistributed locking using Zookeeper primarily for scripting. After acquiring\nthe lock, the zk node is printed to STDOUT. This zk node should be passed to\nunlock. Note: all logs are printed to STDERR\n\npositional arguments:\n  {lock,rlock,wlock,unlock,list}\n                        lock: acquire a mutex lock. rlock: acquire a read lock\n                        wlock: acquire a write lock. unlock: release lock\n                        identified by zk node. list: list all lock contenders\n  lock_path             ZK path to lock OR ZK node to unlock. For the\n                        unlockaction this must be the chrooted zk path to the\n                        node e.g.lockpick lock -c /devops /mylocklockpick\n                        unlock -c /devops /mylock/9d2badeec7684f35b10f4860db42\n                        e45c__rlock__0000000022\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -s SERVERS, --servers SERVERS\n  -c CHROOT, --chroot CHROOT\n                        ZK chroot for the lock path\n  -i IDENTIFIER, --identifier IDENTIFIER\n                        Optional string identifier to add to the lock node OR\n                        verify when unlocking\n  -v, --verbose\n  -r RETRY_COUNT, --retry-count RETRY_COUNT\n  -p RETRY_SLEEP, --retry-sleep RETRY_SLEEP\n```\n\n## Install\n\nWe recommend using pip to install in a virtualenv :\n\n```\n$ virtualenv lockpick\n$ pip install lockpick\n```\n\n## Example\n\n```console\n$ lockpick -s localhost:2181 -c /test -i \"test lock1\" rlock /mylock\n/mylock/503e61fadc8f492497db823b87e64afe__rlock__0000000038\n\n$ lockpick -s localhost:2181 -c /test -i \"test lock1\" rlock /mylock\n/mylock/e21b0ecd480346aaaba23e77946e16e9__rlock__0000000039\n\n$ lockpick -s localhost:2181 -c /test -i \"test lock1\" list /mylock\n'test lock1' /mylock/e21b0ecd480346aaaba23e77946e16e9__rlock__0000000039\n'test lock1' /mylock/503e61fadc8f492497db823b87e64afe__rlock__0000000038\n\n$ lockpick -s localhost:2181 -c /test -i \"test lock1\" wlock /mylock\n[2018-07-25 19:09:53,095] WARNING lockpick: Waiting to acquire lock, contenders are :\n[2018-07-25 19:09:53,103] WARNING lockpick: 'test lock1' /mylock/e21b0ecd480346aaaba23e77946e16e9__rlock__0000000039\n[2018-07-25 19:09:53,103] WARNING lockpick: 'test lock1' /mylock/503e61fadc8f492497db823b87e64afe__rlock__0000000038\n[2018-07-25 19:09:53,104] WARNING lockpick: 'test lock1' /mylock/492b4a6c1727417daf511b343d0d11b7__lock__0000000042\n[2018-07-25 19:09:56,104] WARNING lockpick: Waiting to acquire lock, contenders are :\n[2018-07-25 19:09:56,114] WARNING lockpick: 'test lock1' /mylock/e21b0ecd480346aaaba23e77946e16e9__rlock__0000000039\n[2018-07-25 19:09:56,114] WARNING lockpick: 'test lock1' /mylock/503e61fadc8f492497db823b87e64afe__rlock__0000000038\n[2018-07-25 19:09:56,114] WARNING lockpick: 'test lock1' /mylock/492b4a6c1727417daf511b343d0d11b7__lock__0000000042\n[2018-07-25 19:09:59,116] WARNING lockpick: LockTimeout exception rasied by locker thread\n[2018-07-25 19:09:59,117] ERROR lockpick: Failed to acquire lock within timeout!\n\n$ lockpick -s localhost:2181 -c /test -i \"test lock1\" unlock /mylock/503e61fadc8f492497db823b87e64afe__rlock__0000000038\n\n$ lockpick -s localhost:2181 -c /test -i \"test lock1\" unlock /mylock/e21b0ecd480346aaaba23e77946e16e9__rlock__0000000039\n\n$ lockpick -s localhost:2181 -c /test -i \"test lock1\" wlock /mylock\n/mylock/d6602d4a54124826b27c50a43ab67a5e__lock__0000000043\n```\n\n## syncd_spawn.sh\n\nSpawns the given command only if it can acquire the given lock.\n\n```console\n./syncd_spawn -n /test -C 'test' -l rlock sleep 5\nGot lock on /test\nRunning your command sleep 5\nUnlocked '/test/141bcfad04c6459591164ea12d1604af__rlock__0000000011'\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraags%2Flockpick","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraags%2Flockpick","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraags%2Flockpick/lists"}