apache-airflow-task-sdk 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. airflow/sdk/__init__.py +127 -0
  2. airflow/sdk/api/__init__.py +16 -0
  3. airflow/sdk/api/client.py +726 -0
  4. airflow/sdk/api/datamodels/__init__.py +16 -0
  5. airflow/sdk/api/datamodels/_generated.py +481 -0
  6. airflow/sdk/api/datamodels/activities.py +31 -0
  7. airflow/sdk/bases/__init__.py +16 -0
  8. airflow/sdk/bases/decorator.py +688 -0
  9. airflow/sdk/bases/notifier.py +107 -0
  10. airflow/sdk/bases/operator.py +1882 -0
  11. airflow/sdk/bases/operatorlink.py +66 -0
  12. airflow/sdk/bases/sensor.py +366 -0
  13. airflow/sdk/bases/xcom.py +325 -0
  14. airflow/sdk/definitions/__init__.py +16 -0
  15. airflow/sdk/definitions/_internal/__init__.py +16 -0
  16. airflow/sdk/definitions/_internal/abstractoperator.py +498 -0
  17. airflow/sdk/definitions/_internal/contextmanager.py +138 -0
  18. airflow/sdk/definitions/_internal/dag_parsing_context.py +37 -0
  19. airflow/sdk/definitions/_internal/decorators.py +42 -0
  20. airflow/sdk/definitions/_internal/expandinput.py +281 -0
  21. airflow/sdk/definitions/_internal/mixins.py +142 -0
  22. airflow/sdk/definitions/_internal/node.py +254 -0
  23. airflow/sdk/definitions/_internal/templater.py +291 -0
  24. airflow/sdk/definitions/_internal/types.py +80 -0
  25. airflow/sdk/definitions/asset/__init__.py +666 -0
  26. airflow/sdk/definitions/asset/decorators.py +236 -0
  27. airflow/sdk/definitions/asset/metadata.py +36 -0
  28. airflow/sdk/definitions/connection.py +154 -0
  29. airflow/sdk/definitions/context.py +136 -0
  30. airflow/sdk/definitions/dag.py +1150 -0
  31. airflow/sdk/definitions/decorators/__init__.py +62 -0
  32. airflow/sdk/definitions/decorators/__init__.pyi +778 -0
  33. airflow/sdk/definitions/decorators/condition.py +116 -0
  34. airflow/sdk/definitions/decorators/setup_teardown.py +89 -0
  35. airflow/sdk/definitions/decorators/task_group.py +214 -0
  36. airflow/sdk/definitions/edges.py +189 -0
  37. airflow/sdk/definitions/macros.py +117 -0
  38. airflow/sdk/definitions/mappedoperator.py +836 -0
  39. airflow/sdk/definitions/param.py +352 -0
  40. airflow/sdk/definitions/taskgroup.py +711 -0
  41. airflow/sdk/definitions/template.py +32 -0
  42. airflow/sdk/definitions/variable.py +77 -0
  43. airflow/sdk/definitions/xcom_arg.py +626 -0
  44. airflow/sdk/exceptions.py +64 -0
  45. airflow/sdk/execution_time/__init__.py +17 -0
  46. airflow/sdk/execution_time/callback_runner.py +110 -0
  47. airflow/sdk/execution_time/comms.py +618 -0
  48. airflow/sdk/execution_time/context.py +729 -0
  49. airflow/sdk/execution_time/execute_workload.py +119 -0
  50. airflow/sdk/execution_time/lazy_sequence.py +187 -0
  51. airflow/sdk/execution_time/secrets_masker.py +469 -0
  52. airflow/sdk/execution_time/supervisor.py +1325 -0
  53. airflow/sdk/execution_time/task_runner.py +1228 -0
  54. airflow/sdk/execution_time/xcom.py +39 -0
  55. airflow/sdk/io/__init__.py +23 -0
  56. airflow/sdk/io/path.py +412 -0
  57. airflow/sdk/io/stat.py +83 -0
  58. airflow/sdk/io/store.py +160 -0
  59. airflow/sdk/log.py +538 -0
  60. airflow/sdk/py.typed +18 -0
  61. airflow/sdk/types.py +141 -0
  62. apache_airflow_task_sdk-1.0.0.dist-info/METADATA +83 -0
  63. apache_airflow_task_sdk-1.0.0.dist-info/RECORD +65 -0
  64. apache_airflow_task_sdk-1.0.0.dist-info/WHEEL +4 -0
  65. apache_airflow_task_sdk-1.0.0.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,127 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one
2
+ # or more contributor license agreements. See the NOTICE file
3
+ # distributed with this work for additional information
4
+ # regarding copyright ownership. The ASF licenses this file
5
+ # to you under the Apache License, Version 2.0 (the
6
+ # "License"); you may not use this file except in compliance
7
+ # with the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.
17
+ from __future__ import annotations
18
+
19
+ from typing import TYPE_CHECKING
20
+
21
+ __all__ = [
22
+ "__version__",
23
+ "Asset",
24
+ "AssetAlias",
25
+ "AssetAll",
26
+ "AssetAny",
27
+ "AssetWatcher",
28
+ "BaseNotifier",
29
+ "BaseOperator",
30
+ "BaseOperatorLink",
31
+ "BaseSensorOperator",
32
+ "Connection",
33
+ "Context",
34
+ "DAG",
35
+ "EdgeModifier",
36
+ "Label",
37
+ "Metadata",
38
+ "ObjectStoragePath",
39
+ "Param",
40
+ "PokeReturnValue",
41
+ "TaskGroup",
42
+ "Variable",
43
+ "XComArg",
44
+ "asset",
45
+ "chain",
46
+ "chain_linear",
47
+ "cross_downstream",
48
+ "dag",
49
+ "get_current_context",
50
+ "get_parsing_context",
51
+ "literal",
52
+ "setup",
53
+ "task",
54
+ "task_group",
55
+ "teardown",
56
+ ]
57
+
58
+ __version__ = "1.0.0"
59
+
60
+ if TYPE_CHECKING:
61
+ from airflow.sdk.bases.notifier import BaseNotifier
62
+ from airflow.sdk.bases.operator import BaseOperator, chain, chain_linear, cross_downstream
63
+ from airflow.sdk.bases.operatorlink import BaseOperatorLink
64
+ from airflow.sdk.bases.sensor import BaseSensorOperator, PokeReturnValue
65
+ from airflow.sdk.definitions.asset import Asset, AssetAlias, AssetAll, AssetAny, AssetWatcher
66
+ from airflow.sdk.definitions.asset.decorators import asset
67
+ from airflow.sdk.definitions.asset.metadata import Metadata
68
+ from airflow.sdk.definitions.connection import Connection
69
+ from airflow.sdk.definitions.context import Context, get_current_context, get_parsing_context
70
+ from airflow.sdk.definitions.dag import DAG, dag
71
+ from airflow.sdk.definitions.decorators import setup, task, teardown
72
+ from airflow.sdk.definitions.decorators.task_group import task_group
73
+ from airflow.sdk.definitions.edges import EdgeModifier, Label
74
+ from airflow.sdk.definitions.param import Param
75
+ from airflow.sdk.definitions.taskgroup import TaskGroup
76
+ from airflow.sdk.definitions.template import literal
77
+ from airflow.sdk.definitions.variable import Variable
78
+ from airflow.sdk.definitions.xcom_arg import XComArg
79
+ from airflow.sdk.io.path import ObjectStoragePath
80
+
81
+ __lazy_imports: dict[str, str] = {
82
+ "Asset": ".definitions.asset",
83
+ "AssetAlias": ".definitions.asset",
84
+ "AssetAll": ".definitions.asset",
85
+ "AssetAny": ".definitions.asset",
86
+ "AssetWatcher": ".definitions.asset",
87
+ "BaseNotifier": ".definitions.notifier",
88
+ "BaseOperator": ".bases.operator",
89
+ "BaseOperatorLink": ".bases.operatorlink",
90
+ "BaseSensorOperator": ".bases.sensor",
91
+ "Connection": ".definitions.connection",
92
+ "Context": ".definitions.context",
93
+ "DAG": ".definitions.dag",
94
+ "EdgeModifier": ".definitions.edges",
95
+ "Label": ".definitions.edges",
96
+ "Metadata": ".definitions.asset.metadata",
97
+ "ObjectStoragePath": ".io.path",
98
+ "Param": ".definitions.param",
99
+ "PokeReturnValue": ".bases.sensor",
100
+ "TaskGroup": ".definitions.taskgroup",
101
+ "Variable": ".definitions.variable",
102
+ "XComArg": ".definitions.xcom_arg",
103
+ "asset": ".definitions.asset.decorators",
104
+ "chain": ".bases.operator",
105
+ "chain_linear": ".bases.operator",
106
+ "cross_downstream": ".bases.operator",
107
+ "dag": ".definitions.dag",
108
+ "get_current_context": ".definitions.context",
109
+ "get_parsing_context": ".definitions.context",
110
+ "setup": ".definitions.decorators",
111
+ "task": ".definitions.decorators",
112
+ "task_group": ".definitions.decorators",
113
+ "teardown": ".definitions.decorators",
114
+ }
115
+
116
+
117
+ def __getattr__(name: str):
118
+ if module_path := __lazy_imports.get(name):
119
+ import importlib
120
+
121
+ mod = importlib.import_module(module_path, __name__)
122
+ val = getattr(mod, name)
123
+
124
+ # Store for next time
125
+ globals()[name] = val
126
+ return val
127
+ raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
@@ -0,0 +1,16 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one
2
+ # or more contributor license agreements. See the NOTICE file
3
+ # distributed with this work for additional information
4
+ # regarding copyright ownership. The ASF licenses this file
5
+ # to you under the Apache License, Version 2.0 (the
6
+ # "License"); you may not use this file except in compliance
7
+ # with the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing,
12
+ # software distributed under the License is distributed on an
13
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14
+ # KIND, either express or implied. See the License for the
15
+ # specific language governing permissions and limitations
16
+ # under the License.