JSON Web Encryption implementation in Python
import jwe
key = b'MySecretKey'
salt = b'pepper'
derived_key = jwe.kdf(key, salt)
encoded = jwe.encrypt(b'SuperSecretData', derived_key)
print(encoded)
jwe.decrypt(encoded, derived_key) # b'SuperSecretData'
jwe.kdf
is a very simple key derivation function that uses the PBKDF2.
It is mostly there for the purpose of key stretching so that users' keys do not have to be the perfect length for AES256.
You do not have to use it, but if you do not your key must be exactly 256 bits.
Because key wrapping is more or less completely useless.
It met my needs and I've yet to need another method. Feel free to submit an issue if you would like another method implemented.