1# encrypting
2from cryptography.fernet import Fernet
3message = "my deep dark secret".encode()
4
5f = Fernet(key)
6encrypted = f.encrypt(message)
7# decrypting
8from cryptography.fernet import Fernet
9encrypted = b"...encrypted bytes..."
10
11f = Fernet(key)
12decrypted = f.decrypt(encrypted)