Skip to main content

Utility for encrypting and decrypting secrets with the AWS KMS service.

Installation

Install from PyPI with pip

pip install aws-kms-crypt

Usage

Requires Python 3.8 or newer.

import kmscrypt

# Encrypting Data
>>> result = kmscrypt.encrypt('secretp4ssw0rd!', key_id='alias/common', encryption_context={
...     'purpose': 'automation'
... })
>>> result
{
    "EncryptedDataKey": "AQIDAHhyrbU/fPcQ+a8pJiYC<snip>",
    "Iv": "689806fe9d571afeffa4c7c24247c766",
    "EncryptedData": "YRjZDQ2KzcEAZqUy7SpWWA==",
    "EncryptionContext": {
        "purpose": "automation"
    }
}

# Decrypting data
>>> kmscrypt.decrypt(result)
b'secretp4ssw0rd!'

Changelog

v3.0.0 (2024-01-31)

  • Dropped Python 3.7 support.

v2.0.0 (2022-09-15)

  • Dropped Python 3.6 support.

v1.0.0 (2021-09-25)

License

MIT

Metadata

Release files for aws-kms-crypt 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aws-kms-crypt 3.0.0
File Size Uploaded Provenance Actions
aws_kms_crypt-3.0.0.tar.gz 3.7 kB Without provenance Details for aws_kms_crypt-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aws-kms-crypt 3.0.0
File Interpreter ABI Platform Actions
aws_kms_crypt-3.0.0-py3-none-any.whl Python 3 none any Details for aws_kms_crypt-3.0.0-py3-none-any.whl

Total release size: 8.3 kB

Release files / aws_kms_crypt-3.0.0.tar.gz

Download URL aws_kms_crypt-3.0.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
24f9c761707608642decceef2f1519c05ad4c42425b8ebc0815aea3962a6078a
BLAKE2b-256 checksum
How to use checksums
b3fb8774c37b51be7fc6f71704d2bf3720355aa96548cef57b16d77799dd2890
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.12 Linux/5.15.133.1-microsoft-standard-WSL2

Release files / aws_kms_crypt-3.0.0-py3-none-any.whl

Download URL aws_kms_crypt-3.0.0-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
29c4c876245e78c18e95b2bf596547e7c5dabd71d1e3941ae682b6e6172d6070
BLAKE2b-256 checksum
How to use checksums
2d901ed34fab5ded9d31ac862889adde3c25c8990e53ef5e5185ae6c87d6a5bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.12 Linux/5.15.133.1-microsoft-standard-WSL2

Security for aws-kms-crypt 3.0.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page