apache-airflow-providers-standard 0.0.3rc2__py3-none-any.whl → 1.0.0.dev0__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.

Potentially problematic release.


This version of apache-airflow-providers-standard might be problematic. Click here for more details.

Files changed (35) hide show
  1. airflow/providers/standard/__init__.py +1 -23
  2. airflow/providers/standard/get_provider_info.py +5 -52
  3. airflow/providers/standard/operators/datetime.py +2 -3
  4. airflow/providers/standard/operators/weekday.py +1 -4
  5. airflow/providers/standard/sensors/date_time.py +7 -27
  6. airflow/providers/standard/sensors/time.py +4 -23
  7. airflow/providers/standard/sensors/time_delta.py +4 -29
  8. airflow/providers/standard/sensors/weekday.py +1 -2
  9. {apache_airflow_providers_standard-0.0.3rc2.dist-info → apache_airflow_providers_standard-1.0.0.dev0.dist-info}/METADATA +17 -18
  10. apache_airflow_providers_standard-1.0.0.dev0.dist-info/RECORD +15 -0
  11. {apache_airflow_providers_standard-0.0.3rc2.dist-info → apache_airflow_providers_standard-1.0.0.dev0.dist-info}/WHEEL +1 -1
  12. airflow/providers/standard/hooks/__init__.py +0 -16
  13. airflow/providers/standard/hooks/filesystem.py +0 -89
  14. airflow/providers/standard/hooks/package_index.py +0 -95
  15. airflow/providers/standard/hooks/subprocess.py +0 -119
  16. airflow/providers/standard/operators/bash.py +0 -312
  17. airflow/providers/standard/operators/generic_transfer.py +0 -134
  18. airflow/providers/standard/operators/latest_only.py +0 -78
  19. airflow/providers/standard/operators/python.py +0 -1155
  20. airflow/providers/standard/operators/trigger_dagrun.py +0 -296
  21. airflow/providers/standard/sensors/bash.py +0 -116
  22. airflow/providers/standard/sensors/external_task.py +0 -512
  23. airflow/providers/standard/sensors/filesystem.py +0 -154
  24. airflow/providers/standard/sensors/python.py +0 -81
  25. airflow/providers/standard/triggers/__init__.py +0 -16
  26. airflow/providers/standard/triggers/external_task.py +0 -216
  27. airflow/providers/standard/triggers/file.py +0 -77
  28. airflow/providers/standard/triggers/temporal.py +0 -114
  29. airflow/providers/standard/utils/__init__.py +0 -16
  30. airflow/providers/standard/utils/python_virtualenv.py +0 -209
  31. airflow/providers/standard/utils/python_virtualenv_script.jinja2 +0 -101
  32. airflow/providers/standard/utils/sensor_helper.py +0 -123
  33. airflow/providers/standard/version_compat.py +0 -36
  34. apache_airflow_providers_standard-0.0.3rc2.dist-info/RECORD +0 -37
  35. {apache_airflow_providers_standard-0.0.3rc2.dist-info → apache_airflow_providers_standard-1.0.0.dev0.dist-info}/entry_points.txt +0 -0
@@ -1,3 +1,4 @@
1
+ #
1
2
  # Licensed to the Apache Software Foundation (ASF) under one
2
3
  # or more contributor license agreements. See the NOTICE file
3
4
  # distributed with this work for additional information
@@ -14,26 +15,3 @@
14
15
  # KIND, either express or implied. See the License for the
15
16
  # specific language governing permissions and limitations
16
17
  # under the License.
17
- #
18
- # NOTE! THIS FILE IS AUTOMATICALLY GENERATED AND WILL BE
19
- # OVERWRITTEN WHEN PREPARING DOCUMENTATION FOR THE PACKAGES.
20
- #
21
- # IF YOU WANT TO MODIFY THIS FILE, YOU SHOULD MODIFY THE TEMPLATE
22
- # `PROVIDER__INIT__PY_TEMPLATE.py.jinja2` IN the `dev/breeze/src/airflow_breeze/templates` DIRECTORY
23
- #
24
- from __future__ import annotations
25
-
26
- import packaging.version
27
-
28
- from airflow import __version__ as airflow_version
29
-
30
- __all__ = ["__version__"]
31
-
32
- __version__ = "0.0.3"
33
-
34
- if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
- "2.9.0"
36
- ):
37
- raise RuntimeError(
38
- f"The package `apache-airflow-providers-standard:{__version__}` needs Apache Airflow 2.9.0+"
39
- )
@@ -27,20 +27,16 @@ def get_provider_info():
27
27
  "package-name": "apache-airflow-providers-standard",
28
28
  "name": "Standard",
29
29
  "description": "Airflow Standard Provider\n",
30
- "state": "ready",
31
- "source-date-epoch": 1734536895,
32
- "versions": ["0.0.3", "0.0.2", "0.0.1"],
33
- "dependencies": ["apache-airflow>=2.9.0", "apache-airflow-providers-common-sql>=1.20.0"],
30
+ "state": "not-ready",
31
+ "source-date-epoch": 1718603992,
32
+ "versions": ["1.0.0"],
33
+ "dependencies": ["apache-airflow>=2.10.0"],
34
34
  "integrations": [
35
35
  {
36
36
  "integration-name": "Standard",
37
37
  "external-doc-url": "https://airflow.apache.org/",
38
38
  "tags": ["apache"],
39
- "how-to-guide": [
40
- "/docs/apache-airflow-providers-standard/operators/bash.rst",
41
- "/docs/apache-airflow-providers-standard/operators/python.rst",
42
- "/docs/apache-airflow-providers-standard/operators/datetime.rst",
43
- ],
39
+ "how-to-guide": ["/docs/apache-airflow-providers-standard/operators.rst"],
44
40
  }
45
41
  ],
46
42
  "operators": [
@@ -49,11 +45,6 @@ def get_provider_info():
49
45
  "python-modules": [
50
46
  "airflow.providers.standard.operators.datetime",
51
47
  "airflow.providers.standard.operators.weekday",
52
- "airflow.providers.standard.operators.bash",
53
- "airflow.providers.standard.operators.python",
54
- "airflow.providers.standard.operators.generic_transfer",
55
- "airflow.providers.standard.operators.trigger_dagrun",
56
- "airflow.providers.standard.operators.latest_only",
57
48
  ],
58
49
  }
59
50
  ],
@@ -65,45 +56,7 @@ def get_provider_info():
65
56
  "airflow.providers.standard.sensors.time_delta",
66
57
  "airflow.providers.standard.sensors.time",
67
58
  "airflow.providers.standard.sensors.weekday",
68
- "airflow.providers.standard.sensors.bash",
69
- "airflow.providers.standard.sensors.python",
70
- "airflow.providers.standard.sensors.filesystem",
71
- "airflow.providers.standard.sensors.external_task",
72
- ],
73
- }
74
- ],
75
- "hooks": [
76
- {
77
- "integration-name": "Standard",
78
- "python-modules": [
79
- "airflow.providers.standard.hooks.filesystem",
80
- "airflow.providers.standard.hooks.package_index",
81
- "airflow.providers.standard.hooks.subprocess",
82
59
  ],
83
60
  }
84
61
  ],
85
- "triggers": [
86
- {
87
- "integration-name": "Standard",
88
- "python-modules": [
89
- "airflow.providers.standard.triggers.external_task",
90
- "airflow.providers.standard.triggers.file",
91
- "airflow.providers.standard.triggers.temporal",
92
- ],
93
- }
94
- ],
95
- "config": {
96
- "standard": {
97
- "description": "Options for the standard provider operators.",
98
- "options": {
99
- "venv_install_method": {
100
- "description": "Which python tooling should be used to install the virtual environment.\n\nThe following options are available:\n- ``auto``: Automatically select, use ``uv`` if available, otherwise use ``pip``.\n- ``pip``: Use pip to install the virtual environment.\n- ``uv``: Use uv to install the virtual environment. Must be available in environment PATH.\n",
101
- "version_added": None,
102
- "type": "string",
103
- "example": "uv",
104
- "default": "auto",
105
- }
106
- },
107
- }
108
- },
109
62
  }
@@ -17,8 +17,7 @@
17
17
  from __future__ import annotations
18
18
 
19
19
  import datetime
20
- from collections.abc import Iterable
21
- from typing import TYPE_CHECKING
20
+ from typing import TYPE_CHECKING, Iterable
22
21
 
23
22
  from airflow.exceptions import AirflowException
24
23
  from airflow.operators.branch import BaseBranchOperator
@@ -45,7 +44,7 @@ class BranchDateTimeOperator(BaseBranchOperator):
45
44
  :param target_lower: target lower bound.
46
45
  :param target_upper: target upper bound.
47
46
  :param use_task_logical_date: If ``True``, uses task's logical date to compare with targets.
48
- Logical date is useful for backfilling. If ``False``, uses system's date.
47
+ Execution date is useful for backfilling. If ``False``, uses system's date.
49
48
  """
50
49
 
51
50
  def __init__(
@@ -17,8 +17,7 @@
17
17
  # under the License.
18
18
  from __future__ import annotations
19
19
 
20
- from collections.abc import Iterable
21
- from typing import TYPE_CHECKING
20
+ from typing import TYPE_CHECKING, Iterable
22
21
 
23
22
  from airflow.operators.branch import BaseBranchOperator
24
23
  from airflow.utils import timezone
@@ -40,7 +39,6 @@ class BranchDayOfWeekOperator(BaseBranchOperator):
40
39
  .. code-block:: python
41
40
 
42
41
  from airflow.operators.empty import EmptyOperator
43
- from airflow.operators.weekday import BranchDayOfWeekOperator
44
42
 
45
43
  monday = EmptyOperator(task_id="monday")
46
44
  other_day = EmptyOperator(task_id="other_day")
@@ -61,7 +59,6 @@ class BranchDayOfWeekOperator(BaseBranchOperator):
61
59
  # import WeekDay Enum
62
60
  from airflow.utils.weekday import WeekDay
63
61
  from airflow.operators.empty import EmptyOperator
64
- from airflow.operators.weekday import BranchDayOfWeekOperator
65
62
 
66
63
  workday = EmptyOperator(task_id="workday")
67
64
  weekend = EmptyOperator(task_id="weekend")
@@ -18,29 +18,11 @@
18
18
  from __future__ import annotations
19
19
 
20
20
  import datetime
21
- from collections.abc import Sequence
22
- from dataclasses import dataclass
23
- from typing import TYPE_CHECKING, Any, NoReturn
21
+ from typing import TYPE_CHECKING, Any, NoReturn, Sequence
24
22
 
25
- from airflow.providers.standard.triggers.temporal import DateTimeTrigger
26
- from airflow.providers.standard.version_compat import AIRFLOW_V_3_0_PLUS
27
23
  from airflow.sensors.base import BaseSensorOperator
28
-
29
- try:
30
- from airflow.triggers.base import StartTriggerArgs
31
- except ImportError:
32
- # TODO: Remove this when min airflow version is 2.10.0 for standard provider
33
- @dataclass
34
- class StartTriggerArgs: # type: ignore[no-redef]
35
- """Arguments required for start task execution from triggerer."""
36
-
37
- trigger_cls: str
38
- next_method: str
39
- trigger_kwargs: dict[str, Any] | None = None
40
- next_kwargs: dict[str, Any] | None = None
41
- timeout: datetime.timedelta | None = None
42
-
43
-
24
+ from airflow.triggers.base import StartTriggerArgs
25
+ from airflow.triggers.temporal import DateTimeTrigger
44
26
  from airflow.utils import timezone
45
27
 
46
28
  if TYPE_CHECKING:
@@ -55,7 +37,7 @@ class DateTimeSensor(BaseSensorOperator):
55
37
  It handles some cases for which ``TimeSensor`` and ``TimeDeltaSensor`` are not suited.
56
38
 
57
39
  **Example** 1 :
58
- If a task needs to wait for 11am on each ``logical_date``. Using
40
+ If a task needs to wait for 11am on each ``execution_date``. Using
59
41
  ``TimeSensor`` or ``TimeDeltaSensor``, all backfill tasks started at
60
42
  1am have to wait for 10 hours. This is unnecessary, e.g. a backfill
61
43
  task with ``{{ ds }} = '1970-01-01'`` does not need to wait because
@@ -70,7 +52,7 @@ class DateTimeSensor(BaseSensorOperator):
70
52
 
71
53
  DateTimeSensor(
72
54
  task_id="wait_for_0100",
73
- target_time="{{ data_interval_end.tomorrow().replace(hour=1) }}",
55
+ target_time="{{ next_execution_date.tomorrow().replace(hour=1) }}",
74
56
  )
75
57
 
76
58
  :param target_time: datetime after which the job succeeds. (templated)
@@ -111,7 +93,7 @@ class DateTimeSensorAsync(DateTimeSensor):
111
93
  """
112
94
 
113
95
  start_trigger_args = StartTriggerArgs(
114
- trigger_cls="airflow.providers.standard.triggers.temporal.DateTimeTrigger",
96
+ trigger_cls="airflow.triggers.temporal.DateTimeTrigger",
115
97
  trigger_kwargs={"moment": "", "end_from_trigger": False},
116
98
  next_method="execute_complete",
117
99
  next_kwargs=None,
@@ -143,9 +125,7 @@ class DateTimeSensorAsync(DateTimeSensor):
143
125
  trigger=DateTimeTrigger(
144
126
  moment=timezone.parse(self.target_time),
145
127
  end_from_trigger=self.end_from_trigger,
146
- )
147
- if AIRFLOW_V_3_0_PLUS
148
- else DateTimeTrigger(moment=timezone.parse(self.target_time)),
128
+ ),
149
129
  )
150
130
 
151
131
  def execute_complete(self, context: Context, event: Any = None) -> None:
@@ -18,28 +18,11 @@
18
18
  from __future__ import annotations
19
19
 
20
20
  import datetime
21
- from dataclasses import dataclass
22
21
  from typing import TYPE_CHECKING, Any, NoReturn
23
22
 
24
- from airflow.providers.standard.triggers.temporal import DateTimeTrigger
25
- from airflow.providers.standard.version_compat import AIRFLOW_V_2_10_PLUS
26
23
  from airflow.sensors.base import BaseSensorOperator
27
-
28
- try:
29
- from airflow.triggers.base import StartTriggerArgs
30
- except ImportError:
31
- # TODO: Remove this when min airflow version is 2.10.0 for standard provider
32
- @dataclass
33
- class StartTriggerArgs: # type: ignore[no-redef]
34
- """Arguments required for start task execution from triggerer."""
35
-
36
- trigger_cls: str
37
- next_method: str
38
- trigger_kwargs: dict[str, Any] | None = None
39
- next_kwargs: dict[str, Any] | None = None
40
- timeout: datetime.timedelta | None = None
41
-
42
-
24
+ from airflow.triggers.base import StartTriggerArgs
25
+ from airflow.triggers.temporal import DateTimeTrigger
43
26
  from airflow.utils import timezone
44
27
 
45
28
  if TYPE_CHECKING:
@@ -85,7 +68,7 @@ class TimeSensorAsync(BaseSensorOperator):
85
68
  """
86
69
 
87
70
  start_trigger_args = StartTriggerArgs(
88
- trigger_cls="airflow.providers.standard.triggers.temporal.DateTimeTrigger",
71
+ trigger_cls="airflow.triggers.temporal.DateTimeTrigger",
89
72
  trigger_kwargs={"moment": "", "end_from_trigger": False},
90
73
  next_method="execute_complete",
91
74
  next_kwargs=None,
@@ -119,9 +102,7 @@ class TimeSensorAsync(BaseSensorOperator):
119
102
 
120
103
  def execute(self, context: Context) -> NoReturn:
121
104
  self.defer(
122
- trigger=DateTimeTrigger(moment=self.target_datetime, end_from_trigger=self.end_from_trigger)
123
- if AIRFLOW_V_2_10_PLUS
124
- else DateTimeTrigger(moment=self.target_datetime),
105
+ trigger=DateTimeTrigger(moment=self.target_datetime, end_from_trigger=self.end_from_trigger),
125
106
  method_name="execute_complete",
126
107
  )
127
108
 
@@ -21,25 +21,16 @@ from datetime import timedelta
21
21
  from time import sleep
22
22
  from typing import TYPE_CHECKING, Any, NoReturn
23
23
 
24
- from packaging.version import Version
25
-
26
24
  from airflow.configuration import conf
27
25
  from airflow.exceptions import AirflowSkipException
28
- from airflow.providers.standard.triggers.temporal import DateTimeTrigger, TimeDeltaTrigger
29
- from airflow.providers.standard.version_compat import AIRFLOW_V_3_0_PLUS
30
26
  from airflow.sensors.base import BaseSensorOperator
27
+ from airflow.triggers.temporal import DateTimeTrigger, TimeDeltaTrigger
31
28
  from airflow.utils import timezone
32
29
 
33
30
  if TYPE_CHECKING:
34
31
  from airflow.utils.context import Context
35
32
 
36
33
 
37
- def _get_airflow_version():
38
- from airflow import __version__ as airflow_version
39
-
40
- return Version(Version(airflow_version).base_version)
41
-
42
-
43
34
  class TimeDeltaSensor(BaseSensorOperator):
44
35
  """
45
36
  Waits for a timedelta after the run's data interval.
@@ -90,27 +81,13 @@ class TimeDeltaSensorAsync(TimeDeltaSensor):
90
81
  # If the target datetime is in the past, return immediately
91
82
  return True
92
83
  try:
93
- if AIRFLOW_V_3_0_PLUS:
94
- trigger = DateTimeTrigger(moment=target_dttm, end_from_trigger=self.end_from_trigger)
95
- else:
96
- trigger = DateTimeTrigger(moment=target_dttm)
84
+ trigger = DateTimeTrigger(moment=target_dttm, end_from_trigger=self.end_from_trigger)
97
85
  except (TypeError, ValueError) as e:
98
86
  if self.soft_fail:
99
87
  raise AirflowSkipException("Skipping due to soft_fail is set to True.") from e
100
88
  raise
101
89
 
102
- # todo: remove backcompat when min airflow version greater than 2.11
103
- timeout: int | float | timedelta
104
- if _get_airflow_version() >= Version("2.11.0"):
105
- timeout = self.timeout
106
- else:
107
- timeout = timedelta(seconds=self.timeout)
108
-
109
- self.defer(
110
- trigger=trigger,
111
- method_name="execute_complete",
112
- timeout=timeout,
113
- )
90
+ self.defer(trigger=trigger, method_name="execute_complete")
114
91
 
115
92
  def execute_complete(self, context: Context, event: Any = None) -> None:
116
93
  """Handle the event when the trigger fires and return immediately."""
@@ -144,9 +121,7 @@ class WaitSensor(BaseSensorOperator):
144
121
  def execute(self, context: Context) -> None:
145
122
  if self.deferrable:
146
123
  self.defer(
147
- trigger=TimeDeltaTrigger(self.time_to_wait, end_from_trigger=True)
148
- if AIRFLOW_V_3_0_PLUS
149
- else TimeDeltaTrigger(self.time_to_wait),
124
+ trigger=TimeDeltaTrigger(self.time_to_wait, end_from_trigger=True),
150
125
  method_name="execute_complete",
151
126
  )
152
127
  else:
@@ -17,8 +17,7 @@
17
17
  # under the License.
18
18
  from __future__ import annotations
19
19
 
20
- from collections.abc import Iterable
21
- from typing import TYPE_CHECKING
20
+ from typing import TYPE_CHECKING, Iterable
22
21
 
23
22
  from airflow.sensors.base import BaseSensorOperator
24
23
  from airflow.utils import timezone
@@ -1,11 +1,11 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.1
2
2
  Name: apache-airflow-providers-standard
3
- Version: 0.0.3rc2
3
+ Version: 1.0.0.dev0
4
4
  Summary: Provider package apache-airflow-providers-standard for Apache Airflow
5
5
  Keywords: airflow-provider,standard,airflow,integration
6
6
  Author-email: Apache Software Foundation <dev@airflow.apache.org>
7
7
  Maintainer-email: Apache Software Foundation <dev@airflow.apache.org>
8
- Requires-Python: ~=3.9
8
+ Requires-Python: ~=3.8
9
9
  Description-Content-Type: text/x-rst
10
10
  Classifier: Development Status :: 5 - Production/Stable
11
11
  Classifier: Environment :: Console
@@ -15,19 +15,19 @@ Classifier: Intended Audience :: System Administrators
15
15
  Classifier: Framework :: Apache Airflow
16
16
  Classifier: Framework :: Apache Airflow :: Provider
17
17
  Classifier: License :: OSI Approved :: Apache Software License
18
+ Classifier: Programming Language :: Python :: 3.8
18
19
  Classifier: Programming Language :: Python :: 3.9
19
20
  Classifier: Programming Language :: Python :: 3.10
20
21
  Classifier: Programming Language :: Python :: 3.11
21
22
  Classifier: Programming Language :: Python :: 3.12
22
23
  Classifier: Topic :: System :: Monitoring
23
- Requires-Dist: apache-airflow-providers-common-sql>=1.20.0rc0
24
- Requires-Dist: apache-airflow>=2.9.0rc0
24
+ Requires-Dist: apache-airflow>=2.10.0.dev0
25
25
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
26
- Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-standard/0.0.3/changelog.html
27
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-standard/0.0.3
26
+ Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-standard/1.0.0/changelog.html
27
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-standard/1.0.0
28
28
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
29
29
  Project-URL: Source Code, https://github.com/apache/airflow
30
- Project-URL: Twitter, https://x.com/ApacheAirflow
30
+ Project-URL: Twitter, https://twitter.com/ApacheAirflow
31
31
  Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
32
32
 
33
33
 
@@ -74,7 +74,7 @@ Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
74
74
 
75
75
  Package ``apache-airflow-providers-standard``
76
76
 
77
- Release: ``0.0.3.rc2``
77
+ Release: ``1.0.0.dev0``
78
78
 
79
79
 
80
80
  Airflow Standard Provider
@@ -87,7 +87,7 @@ This is a provider package for ``standard`` provider. All classes for this provi
87
87
  are in ``airflow.providers.standard`` python package.
88
88
 
89
89
  You can find package information and changelog for the provider
90
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-standard/0.0.3/>`_.
90
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-standard/1.0.0/>`_.
91
91
 
92
92
  Installation
93
93
  ------------
@@ -96,17 +96,16 @@ You can install this package on top of an existing Airflow 2 installation (see `
96
96
  for the minimum Airflow version supported) via
97
97
  ``pip install apache-airflow-providers-standard``
98
98
 
99
- The package supports the following python versions: 3.9,3.10,3.11,3.12
99
+ The package supports the following python versions: 3.8,3.9,3.10,3.11,3.12
100
100
 
101
101
  Requirements
102
102
  ------------
103
103
 
104
- ======================================= ==================
105
- PIP package Version required
106
- ======================================= ==================
107
- ``apache-airflow`` ``>=2.9.0``
108
- ``apache-airflow-providers-common-sql`` ``>=1.20.0``
109
- ======================================= ==================
104
+ ================== ==================
105
+ PIP package Version required
106
+ ================== ==================
107
+ ``apache-airflow`` ``>=2.10.0``
108
+ ================== ==================
110
109
 
111
110
  The changelog for the provider package can be found in the
112
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-standard/0.0.3/changelog.html>`_.
111
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-standard/1.0.0/changelog.html>`_.
@@ -0,0 +1,15 @@
1
+ airflow/providers/standard/LICENSE,sha256=FFb4jd2AXnOOf7XLP04pQW6jbdhG49TxlGY6fFpCV1Y,13609
2
+ airflow/providers/standard/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
3
+ airflow/providers/standard/get_provider_info.py,sha256=YOJ5MXuFZYg9TBhXtStPLjwKRCXwBj5sT1N_QE64i6s,2431
4
+ airflow/providers/standard/operators/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
5
+ airflow/providers/standard/operators/datetime.py,sha256=nk0gwO_H8vIIu8ztA4zryWqZeoSokfINTu4o2vPUcPc,4562
6
+ airflow/providers/standard/operators/weekday.py,sha256=ws1FHHxFVEZhq8MDfBvNmI9pjH5QcHqueRkuanhayeQ,4474
7
+ airflow/providers/standard/sensors/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
8
+ airflow/providers/standard/sensors/date_time.py,sha256=WKoMTLuSYwNbsvvkndRmiTGa6GN3jeolAGazbPDMeUk,5179
9
+ airflow/providers/standard/sensors/time.py,sha256=nhKqn7eQKnx-F-MSG_yrlN7RM8ZM3iOSUwgqxc_F2SQ,4142
10
+ airflow/providers/standard/sensors/time_delta.py,sha256=YMNELt0m89PvWsYmWWO-m6RW-ICPOZ8rcABrmt-4xxc,4660
11
+ airflow/providers/standard/sensors/weekday.py,sha256=PMg0eoGuD0xNLSJIBY9C1Y0aqSZn6PkQ_j_eYo7lnks,3695
12
+ apache_airflow_providers_standard-1.0.0.dev0.dist-info/entry_points.txt,sha256=mW2YRh3mVdZdaP5-iGSNgmcCh3YYdALIn28BCLBZZ40,104
13
+ apache_airflow_providers_standard-1.0.0.dev0.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
14
+ apache_airflow_providers_standard-1.0.0.dev0.dist-info/METADATA,sha256=unzipTVuHhQdPFzlb3VhMm9OXHFvX72zrRwrk9NUev0,4698
15
+ apache_airflow_providers_standard-1.0.0.dev0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: flit 3.10.1
2
+ Generator: flit 3.9.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,16 +0,0 @@
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.
@@ -1,89 +0,0 @@
1
- #
2
- # Licensed to the Apache Software Foundation (ASF) under one
3
- # or more contributor license agreements. See the NOTICE file
4
- # distributed with this work for additional information
5
- # regarding copyright ownership. The ASF licenses this file
6
- # to you under the Apache License, Version 2.0 (the
7
- # "License"); you may not use this file except in compliance
8
- # with the License. You may obtain a copy of the License at
9
- #
10
- # http://www.apache.org/licenses/LICENSE-2.0
11
- #
12
- # Unless required by applicable law or agreed to in writing,
13
- # software distributed under the License is distributed on an
14
- # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
- # KIND, either express or implied. See the License for the
16
- # specific language governing permissions and limitations
17
- # under the License.
18
- from __future__ import annotations
19
-
20
- from pathlib import Path
21
- from typing import Any
22
-
23
- from airflow.hooks.base import BaseHook
24
-
25
-
26
- class FSHook(BaseHook):
27
- """
28
- Allows for interaction with an file server.
29
-
30
- Connection should have a name and a path specified under extra:
31
-
32
- example:
33
- Connection Id: fs_test
34
- Connection Type: File (path)
35
- Host, Schema, Login, Password, Port: empty
36
- Extra: {"path": "/tmp"}
37
- """
38
-
39
- conn_name_attr = "fs_conn_id"
40
- default_conn_name = "fs_default"
41
- conn_type = "fs"
42
- hook_name = "File (path)"
43
-
44
- @classmethod
45
- def get_connection_form_widgets(cls) -> dict[str, Any]:
46
- """Return connection widgets to add to connection form."""
47
- from flask_appbuilder.fieldwidgets import BS3TextFieldWidget
48
- from flask_babel import lazy_gettext
49
- from wtforms import StringField
50
-
51
- return {"path": StringField(lazy_gettext("Path"), widget=BS3TextFieldWidget())}
52
-
53
- @classmethod
54
- def get_ui_field_behaviour(cls) -> dict[str, Any]:
55
- """Return custom field behaviour."""
56
- return {
57
- "hidden_fields": ["host", "schema", "port", "login", "password", "extra"],
58
- "relabeling": {},
59
- "placeholders": {},
60
- }
61
-
62
- def __init__(self, fs_conn_id: str = default_conn_name, **kwargs):
63
- super().__init__(**kwargs)
64
- conn = self.get_connection(fs_conn_id)
65
- self.basepath = conn.extra_dejson.get("path", "")
66
- self.conn = conn
67
-
68
- def get_conn(self) -> None:
69
- pass
70
-
71
- def get_path(self) -> str:
72
- """
73
- Get the path to the filesystem location.
74
-
75
- :return: the path.
76
- """
77
- return self.basepath
78
-
79
- def test_connection(self):
80
- """Test File connection."""
81
- try:
82
- p = self.get_path()
83
- if not p:
84
- return False, "File Path is undefined."
85
- if not Path(p).exists():
86
- return False, f"Path {p} does not exist."
87
- return True, f"Path {p} is existing."
88
- except Exception as e:
89
- return False, str(e)