airflow.models.crypto

Module Contents

exception airflow.models.crypto.InvalidFernetToken[source]

Bases: Exception

class airflow.models.crypto.NullFernet[source]

Bases: object

A “Null” encryptor class that doesn’t encrypt or decrypt but that presents a similar interface to Fernet.

The purpose of this is to make the rest of the code not have to know the difference, and to only display the message once, not 20 times when airflow initdb is ran.

is_encrypted = False[source]
decrypt(self, b)[source]
encrypt(self, b)[source]
airflow.models.crypto._fernet[source]
airflow.models.crypto.get_fernet()[source]
Deferred load of Fernet key.

This function could fail either because Cryptography is not installed or because the Fernet key is invalid.

Returns

Fernet object

Raises

airflow.exceptions.AirflowException if there’s a problem trying to load Fernet