[](https://badge.fury.io/py/s3-encryption)
s3-encryption is a thin wrapper around the `boto3` S3 client. It facilitates client-side encryption
which is compatible to that provided by the Ruby aws-sdk-core-resources.
Functionality is currently limited to that demonstrated below:
Upload encrypted content in python:
```python
import boto3
from s3_encryption.client import S3EncryptionClient
REGION = 'us-west-2'
BUCKET = 'testing.stuff.bucket'
s3_key = 'testing.txt'
s3e = S3EncryptionClient(encryption_key=plaintext_key, region_name=REGION)
s3e.put_object(Body='this is a test', Bucket=BUCKET, Key='testing.txt')
s3e.client.put_object(Body=encoded_key, Bucket=BUCKET, Key=s3_key + '.key')
```
Download encrypted content in python:
```python
REGION = 'us-west-2'
BUCKET = 'testing.stuff.bucket'
s3_key = 'testing.txt'
s3 = boto3.client('s3', region_name=REGION)
encoded_key = s3.get_object(Bucket=BUCKET, Key=s3_key + '.key')
plaintext_key = decode_encryption_key(encoded_key)
s3e = S3EncryptionClient(encryption_key=plaintext_key, region_name=REGION)
print s3e.get_object(Bucket=BUCKET, Key=s3_key)
>> 'this is a test'
```
Download encrypted content in ruby:
```ruby
REGION = 'us-west-2'
BUCKET = 'testing.stuff.bucket'
s3_key = 'testing.txt'
s3c = Aws::S3::Client.new
res = s3c.get_object(:bucket => BUCKET, :key => s3_key + '.key')
enc_key = res[:body].read
plaintext_key = decode_encryption_key(enc_key)
s3ec = Aws::S3::Encryption::Client.new(:encryption_key => plaintext_key)
res = s3ec.get_object(:bucket => bucket, :key => s3_key)
body = res[:body].read
puts body
>> 'this is a test'
```
Metadata
Release files for s3-encryption 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| s3-encryption-0.1.3.tar.gz | 9.3 kB | Without provenance | Details for s3-encryption-0.1.3.tar.gz |
Release files / s3-encryption-0.1.3.tar.gz
| Download URL | s3-encryption-0.1.3.tar.gz |
|---|---|
| Size | 9.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
82da0195a70bd1d44edb87950ee121e77174fa32d322dd1097abd3488c38964d
|
|
BLAKE2b-256 checksum How to use checksums |
88c1ac97fa713c6723b1afa7937936c4519fb936e3191990c6cd2b281d7a8f9a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for s3-encryption 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.