| :py:mod:`airflow.sensors.python` |
| ================================ |
| |
| .. py:module:: airflow.sensors.python |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.sensors.python.PythonSensor |
| |
| |
| |
| |
| .. py:class:: PythonSensor(*, python_callable, op_args = None, op_kwargs = None, templates_dict = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.sensors.base.BaseSensorOperator` |
| |
| Waits for a Python callable to return True. |
| |
| User could put input argument in templates_dict |
| e.g ``templates_dict = {'start_ds': 1970}`` |
| and access the argument by calling ``kwargs['templates_dict']['start_ds']`` |
| in the callable |
| |
| :param python_callable: A reference to an object that is callable |
| :param op_kwargs: a dictionary of keyword arguments that will get unpacked |
| in your function |
| :param op_args: a list of positional arguments that will get unpacked when |
| calling your callable |
| :param templates_dict: a dictionary where the values are templates that |
| will get templated by the Airflow engine sometime between |
| ``__init__`` and ``execute`` takes place and are made available |
| in your callable's context after the template has been applied. |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['templates_dict', 'op_args', 'op_kwargs'] |
| |
| |
| |
| .. py:method:: poke(context) |
| |
| Function that the sensors defined while deriving this class should |
| override. |
| |
| |
| |