Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from sqlalchemy_utils import EncryptedType
- from sqlalchemy_utils.types.encrypted.encrypted_type import AesEngine
- enc_args = (get_env_variable('AES_KEY'), AesEngine, 'pkcs5')
- class Example(db.Model):
- __tablename__ = 'example'
- attr = db.Column(EncryptedType(db.String, *enc_args))
Add Comment
Please, Sign In to add comment