This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
kmsencrypt.py | |
AWS kms + python Cryptography library file encrypt and decrypt | |
This will perform a file encryption and decryption using AWS KMS for generating a data key | |
rather than using the Fernet generate_key function. | |
Assumes that AWS access key, secret or token have been setup outside using credentials file or envvars |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import tempfile | |
import unittest | |
from sqlalchemy import create_engine | |
from sqlalchemy.orm import sessionmaker | |
from youapp.model import Base # replace this with your app's model base | |
""" |