| :py:mod:`airflow.models.crypto` |
| =============================== |
| |
| .. py:module:: airflow.models.crypto |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.models.crypto.FernetProtocol |
| airflow.models.crypto.NullFernet |
| |
| |
| |
| Functions |
| ~~~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.models.crypto.get_fernet |
| |
| |
| |
| Attributes |
| ~~~~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.models.crypto.log |
| |
| |
| .. py:data:: log |
| |
| |
| |
| |
| .. py:class:: FernetProtocol |
| |
| Bases: :py:obj:`airflow.typing_compat.Protocol` |
| |
| This class is only used for TypeChecking (for IDEs, mypy, etc) |
| |
| .. py:method:: decrypt(b) |
| |
| Decrypt with Fernet |
| |
| |
| .. py:method:: encrypt(b) |
| |
| Encrypt with Fernet |
| |
| |
| |
| .. py:class:: NullFernet |
| |
| 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 db init` is ran. |
| |
| .. py:attribute:: is_encrypted |
| :annotation: = False |
| |
| |
| |
| .. py:method:: decrypt(b) |
| |
| Decrypt with Fernet. |
| |
| |
| .. py:method:: encrypt(b) |
| |
| Encrypt with Fernet. |
| |
| |
| |
| .. py:function:: get_fernet() |
| |
| Deferred load of Fernet key. |
| |
| This function could fail either because Cryptography is not installed |
| or because the Fernet key is invalid. |
| |
| :return: Fernet object |
| :raises: airflow.exceptions.AirflowException if there's a problem trying to load Fernet |
| |
| |