https://github.com/nuchi/s3-cas
S3-backed content-addressable storage client for Python
https://github.com/nuchi/s3-cas
Last synced: 2 months ago
JSON representation
S3-backed content-addressable storage client for Python
- Host: GitHub
- URL: https://github.com/nuchi/s3-cas
- Owner: nuchi
- License: mit
- Created: 2021-07-12T23:37:42.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-07-13T00:34:14.000Z (almost 5 years ago)
- Last Synced: 2025-12-16T01:53:39.474Z (6 months ago)
- Language: Python
- Size: 2.93 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# S3 Content-Addressable Storage
Store files in S3 indexed by their SHA256 hash instead of by filename.
```text
$ echo 'Hello World!' > foo
$ cp foo foo2
$ cat test.py
import s3_cas
c = s3_cas.S3CasClient("my-bucket", "blobs")
c.upload_file("foo")
c.upload_file("foo2")
$ python test.py
INFO:s3cas:Uploaded file to s3://my-bucket/blobs/03ba204e50d126e4674c005e04d82e84c21366780af1f43bd54a37816b6ab340
INFO:s3cas:File already exists with hash 03ba204e50d126e4674c005e04d82e84c21366780af1f43bd54a37816b6ab340, name foo, not uploading.
```