# S3 Locks
A library for distributed locking using Amazon S3.
Uses [S3 Conditional Writes](https://aws.amazon.com/about-aws/whats-new/2024/11/amazon-s3-functionality-conditional-writes/).
## Usage
```python
from s3_locks import S3Lock
with S3Lock(bucket='my-bucket', key='locks/my-resource', ttl=60) as lock:
# code is only executed if the lock is acquired
print("Lock acquired, performing protected operation")
# lock will be released automatically when exiting the context manager
```
Raw data
{
"_id": null,
"home_page": null,
"name": "s3-locks",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": "s3, locks, distributed, synchronization",
"author": "Thom Lane",
"author_email": "Thom Lane <thom.e.lane@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/76/01/133564e9c586851ed3f4f31a29ae1ccfa53d83136fb4097c8491163af5d6/s3_locks-0.1.0.tar.gz",
"platform": null,
"description": "# S3 Locks\n\nA library for distributed locking using Amazon S3.\nUses [S3 Conditional Writes](https://aws.amazon.com/about-aws/whats-new/2024/11/amazon-s3-functionality-conditional-writes/).\n\n## Usage\n\n```python\nfrom s3_locks import S3Lock\n\nwith S3Lock(bucket='my-bucket', key='locks/my-resource', ttl=60) as lock:\n # code is only executed if the lock is acquired\n print(\"Lock acquired, performing protected operation\")\n # lock will be released automatically when exiting the context manager\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Add your description here",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://github.com/thomelane/s3_locks",
"Issues": "https://github.com/thomelane/s3_locks/issues",
"Repository": "https://github.com/thomelane/s3_locks"
},
"split_keywords": [
"s3",
" locks",
" distributed",
" synchronization"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9bba67c0c4fe45ff2ddf497dc8ee87f579c6d91ff406bce6916825a6720b3e54",
"md5": "e622a07286f003647d5cdd0b81275e1c",
"sha256": "f422532c6b4ae729fa7c61a3c414e8f1a801ee878459f801093dd13f262bfeb2"
},
"downloads": -1,
"filename": "s3_locks-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e622a07286f003647d5cdd0b81275e1c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 5736,
"upload_time": "2025-08-24T20:46:43",
"upload_time_iso_8601": "2025-08-24T20:46:43.770991Z",
"url": "https://files.pythonhosted.org/packages/9b/ba/67c0c4fe45ff2ddf497dc8ee87f579c6d91ff406bce6916825a6720b3e54/s3_locks-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "7601133564e9c586851ed3f4f31a29ae1ccfa53d83136fb4097c8491163af5d6",
"md5": "950f369dbe79ed357ab9b3f020fec670",
"sha256": "3f8a9c700db11568a8a07a992b41c7c94594f681d4fa44ac48935e49191f7ba6"
},
"downloads": -1,
"filename": "s3_locks-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "950f369dbe79ed357ab9b3f020fec670",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 4914,
"upload_time": "2025-08-24T20:46:45",
"upload_time_iso_8601": "2025-08-24T20:46:45.393834Z",
"url": "https://files.pythonhosted.org/packages/76/01/133564e9c586851ed3f4f31a29ae1ccfa53d83136fb4097c8491163af5d6/s3_locks-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-24 20:46:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "thomelane",
"github_project": "s3_locks",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "s3-locks"
}