1>>> from cryptography.fernet import Fernet
2>>> # Put this somewhere safe!
3>>> key = Fernet.generate_key()
4>>> f = Fernet(key)
5>>> token = f.encrypt(b"A really secret message. Not for prying eyes.")
6>>> token
7'...'
8>>> f.decrypt(token)
9'A really secret message. Not for prying eyes.'
10