{"id":15396575,"url":"https://github.com/hupe1980/aws-s3-encryption-python","last_synced_at":"2026-04-21T16:34:08.626Z","repository":{"id":57463419,"uuid":"338262795","full_name":"hupe1980/aws-s3-encryption-python","owner":"hupe1980","description":"Client-side encryption for S3","archived":false,"fork":false,"pushed_at":"2021-02-28T21:19:51.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-31T19:37:06.093Z","etag":null,"topics":["aws","client-side-encryption","s3"],"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/hupe1980.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-12T08:34:32.000Z","updated_at":"2023-01-03T04:08:46.000Z","dependencies_parsed_at":"2022-09-14T16:40:30.998Z","dependency_job_id":null,"html_url":"https://github.com/hupe1980/aws-s3-encryption-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hupe1980/aws-s3-encryption-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hupe1980%2Faws-s3-encryption-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hupe1980%2Faws-s3-encryption-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hupe1980%2Faws-s3-encryption-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hupe1980%2Faws-s3-encryption-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hupe1980","download_url":"https://codeload.github.com/hupe1980/aws-s3-encryption-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hupe1980%2Faws-s3-encryption-python/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262319037,"owners_count":23292998,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["aws","client-side-encryption","s3"],"created_at":"2024-10-01T15:34:14.852Z","updated_at":"2026-04-21T16:34:03.591Z","avatar_url":"https://github.com/hupe1980.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"############################\nS3 Encryption SDK for Python\n############################\n\n.. image:: https://img.shields.io/pypi/v/s3-encryption-sdk.svg\n   :target: https://pypi.python.org/pypi/s3-encryption-sdk\n   :alt: Latest Version\n\n.. image:: https://img.shields.io/pypi/pyversions/s3-encryption-sdk.svg\n   :target: https://pypi.org/project/s3-encryption-sdk\n   :alt: Supported Python Versions\n\n.. image:: https://github.com/hupe1980/aws-s3-encryption-python/workflows/ci/badge.svg\n   :target: https://github.com/hupe1980/aws-s3-encryption-python/actions?query=workflow%3Aci\n   :alt: ci\n\nClient-side encryption for S3\n\nYou can find the source on `GitHub`_.\n\n***************\nGetting Started\n***************\n\nRequired Prerequisites\n======================\n\n* Python 3.6+\n\nInstallation\n============\n\n.. note::\n\n   If you have not already installed `cryptography`_, you might need to install additional\n   prerequisites as detailed in the `cryptography installation guide`_ for your operating\n   system.\n\n   .. code::\n\n       $ pip install s3-encryption-sdk\n\n*****\nUsage\n*****\n\n.. code-block:: python\n\n   import boto3\n   from s3_encryption_sdk import EncryptedClient\n   from s3_encryption_sdk.materials_providers import KmsMaterialsProvider\n\n\n   materials_provider = KmsMaterialsProvider(\n      key_id=\"alias/YourAlias\",\n      client=boto3.client(\"kms\", region_name=\"us-east-1\"),\n   )\n   \n   s3 = boto3.client(\"s3\", region_name=\"us-east-1\")\n   \n   crypto_s3 = EncryptedClient(\n      client=s3,\n      materials_provider=materials_provider,\n   )\n\n   key = \"4711\"\n   plaintext = \"foo bar\"\n   \n   crypto_s3.put_object(\n      Bucket=bucket.name,\n      Key=key,\n      Body=plaintext,\n   )\n   \n   encrypted_obj = s3.get_object(\n      Bucket=bucket.name,\n      Key=\"object\",\n   )\n    \n   decrypted_obj = crypto_s3.get_object(\n      Bucket=bucket.name,\n      Key=\"object\",\n   )\n\n   assert plaintext != encrypted_obj[\"Body\"].read().decode(\"utf8\")\n   assert plaintext == decrypted_obj[\"Body\"].read().decode(\"utf8\")\n\n\n.. _cryptography: https://cryptography.io/en/latest/\n.. _cryptography installation guide: https://cryptography.io/en/latest/installation.html\n.. _GitHub: https://github.com/hupe1980/aws-s3-encryption-python/","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhupe1980%2Faws-s3-encryption-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhupe1980%2Faws-s3-encryption-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhupe1980%2Faws-s3-encryption-python/lists"}