airflow - Airflow API 文档位置
问题描述
我知道这可能是一个不好的问题,但我仍然无法找到我需要的信息。对我来说,从任何气流导入中查看可用的每个功能的最佳方式是什么?例如,我有这两个 Airflow 类:
from airflow.models import Variable
environment = Variable.get("environment")
# and
from airflow import settings
session = settings.Session()
我想看看我能用这两个类做什么。我想查看所有代码可能性,因此我评估是否可以将它们用于我遇到的问题。
通常,我希望找到类似于此https://boto3.readthedocs.io/en/latest/reference/services/emr.html#EMR.Client.list_clusters或此https://docs.python.org/的页面3/library/signal.html仅作为示例。但是对于 Airflow,我能找到的只是这个https://airflow.apache.org/concepts.html#variables,它并没有向我展示 Variable 类的所有可能。我发现某些文件显示了这样的代码https://airflow.apache.org/_modules/airflow/models.html但即使对于该站点,我也找不到变量或设置类。
解决方案
Airflow API 在此处有一个阅读文档部分:https ://airflow.readthedocs.io/en/latest/code.html
例如,您可以在此处查看变量页面:https ://airflow.readthedocs.io/en/latest/code.html#airflow.models.Variable
请注意,文档是由 Sphinx 从方法的文档字符串生成的,有些方法没有文档字符串。将 API 参考页面与源代码进行比较。
推荐阅读
- ignite - 如何将 apache ignite 与 spark 数据框集成以及如何在 spark 数据框上应用索引?
- go - 将字符串复制到字符串结构中
- javascript - 被溢出隐藏的锚点移动到焦点上
- firebird - 无效令牌 - 偏移量 340 处的无效请求 BLR 函数 F_LRTRIM 未定义
- google-api - 401 访问被拒绝。您无权阅读活动记录
- node.js - 路径 \"c_id\"" 处的值 \"In\" 转换为 ObjectID 失败,
- symfony - Symfony 3.2 - 为使用 imagejpeg() 创建的图像回显 file_get_contents() 时的 HTTP 204
- php - codeigniter 和 ajax 表单错误
- ios - AVAudioPlayer 启动时声音太小,之后声音变大
- python - Scrapy on aws ec2 ubuntu redirect for booking.com