Currently the operator allows to set requirement as list that needs to be hard coded.
It would be nice if airflow can support reading from file directly (something similar to how operators read sql file)
airflow/operators/python.py
from airflow.decorators import task
    @task
    def my_task()
    :param python_callable: A reference to an object that is callable
    :type python_callable: python callable
    :param op_kwargs: a dictionary of keyword arguments that will get unpacked
        in your function (templated)
    :type op_kwargs: dict
    :param op_args: a list of positional arguments that will get unpacked when
        calling your callable (templated)
    :type op_args: list
    :param multiple_outputs: if set, function return value will be
        unrolled to multiple XCom values. Dict will unroll to xcom values with keys as keys.
        Defaults to False.
    :type multiple_outputs: bool
    :return:
    """
    
    
    from airflow.decorators.python import python_task
    warnings.warn(
        """airflow.operators.python.task is deprecated. Please use the following instead
        from airflow.decorators import task
        @task
        def my_task()""",
        DeprecationWarning,
        stacklevel=2,
    )
    return python_task(python_callable=python_callable, multiple_outputs=multiple_outputs, **kwargs)
class PythonOperator(BaseOperator):