airflow.sensors.python¶
Module Contents¶
Classes¶
| Waits for a Python callable to return True. | 
- class airflow.sensors.python.PythonSensor(*, python_callable, op_args=None, op_kwargs=None, templates_dict=None, **kwargs)[source]¶
- Bases: - 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- Parameters
- python_callable (Callable) – A reference to an object that is callable 
- op_kwargs (Mapping[str, Any] | None) – a dictionary of keyword arguments that will get unpacked in your function 
- op_args (list | None) – a list of positional arguments that will get unpacked when calling your callable 
- templates_dict (dict | None) – a dictionary where the values are templates that will get templated by the Airflow engine sometime between - __init__and- executetakes place and are made available in your callable’s context after the template has been applied.
 
 - See also - For more information on how to use this sensor, take a look at the guide: PythonSensor 
