apache-airflow-providers-http 4.12.0rc1__py3-none-any.whl → 4.13.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.
- airflow/providers/http/__init__.py +3 -3
- airflow/providers/http/get_provider_info.py +3 -2
- airflow/providers/http/hooks/http.py +18 -9
- airflow/providers/http/operators/http.py +4 -2
- {apache_airflow_providers_http-4.12.0rc1.dist-info → apache_airflow_providers_http-4.13.0.dist-info}/METADATA +8 -8
- apache_airflow_providers_http-4.13.0.dist-info/RECORD +15 -0
- apache_airflow_providers_http-4.12.0rc1.dist-info/RECORD +0 -15
- {apache_airflow_providers_http-4.12.0rc1.dist-info → apache_airflow_providers_http-4.13.0.dist-info}/WHEEL +0 -0
- {apache_airflow_providers_http-4.12.0rc1.dist-info → apache_airflow_providers_http-4.13.0.dist-info}/entry_points.txt +0 -0
@@ -29,11 +29,11 @@ from airflow import __version__ as airflow_version
|
|
29
29
|
|
30
30
|
__all__ = ["__version__"]
|
31
31
|
|
32
|
-
__version__ = "4.
|
32
|
+
__version__ = "4.13.0"
|
33
33
|
|
34
34
|
if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
|
35
|
-
"2.
|
35
|
+
"2.8.0"
|
36
36
|
):
|
37
37
|
raise RuntimeError(
|
38
|
-
f"The package `apache-airflow-providers-http:{__version__}` needs Apache Airflow 2.
|
38
|
+
f"The package `apache-airflow-providers-http:{__version__}` needs Apache Airflow 2.8.0+"
|
39
39
|
)
|
@@ -28,8 +28,9 @@ def get_provider_info():
|
|
28
28
|
"name": "Hypertext Transfer Protocol (HTTP)",
|
29
29
|
"description": "`Hypertext Transfer Protocol (HTTP) <https://www.w3.org/Protocols/>`__\n",
|
30
30
|
"state": "ready",
|
31
|
-
"source-date-epoch":
|
31
|
+
"source-date-epoch": 1723970300,
|
32
32
|
"versions": [
|
33
|
+
"4.13.0",
|
33
34
|
"4.12.0",
|
34
35
|
"4.11.1",
|
35
36
|
"4.11.0",
|
@@ -64,7 +65,7 @@ def get_provider_info():
|
|
64
65
|
"1.0.0",
|
65
66
|
],
|
66
67
|
"dependencies": [
|
67
|
-
"apache-airflow>=2.
|
68
|
+
"apache-airflow>=2.8.0",
|
68
69
|
"requests>=2.27.0,<3",
|
69
70
|
"requests_toolbelt",
|
70
71
|
"aiohttp>=3.9.2",
|
@@ -46,7 +46,8 @@ def _url_from_endpoint(base_url: str | None, endpoint: str | None) -> str:
|
|
46
46
|
|
47
47
|
|
48
48
|
class HttpHook(BaseHook):
|
49
|
-
"""
|
49
|
+
"""
|
50
|
+
Interact with HTTP servers.
|
50
51
|
|
51
52
|
:param method: the API method to be called
|
52
53
|
:param http_conn_id: :ref:`http connection<howto/connection:http>` that has the base
|
@@ -98,7 +99,8 @@ class HttpHook(BaseHook):
|
|
98
99
|
# headers may be passed through directly or in the "extra" field in the connection
|
99
100
|
# definition
|
100
101
|
def get_conn(self, headers: dict[Any, Any] | None = None) -> requests.Session:
|
101
|
-
"""
|
102
|
+
"""
|
103
|
+
Create a Requests HTTP session.
|
102
104
|
|
103
105
|
:param headers: additional headers to be passed through as a dictionary
|
104
106
|
"""
|
@@ -151,7 +153,8 @@ class HttpHook(BaseHook):
|
|
151
153
|
extra_options: dict[str, Any] | None = None,
|
152
154
|
**request_kwargs: Any,
|
153
155
|
) -> Any:
|
154
|
-
r"""
|
156
|
+
r"""
|
157
|
+
Perform the request.
|
155
158
|
|
156
159
|
:param endpoint: the endpoint to be called i.e. resource/v1/query?
|
157
160
|
:param data: payload to be uploaded or request parameters
|
@@ -188,7 +191,8 @@ class HttpHook(BaseHook):
|
|
188
191
|
return self.run_and_check(session, prepped_request, extra_options)
|
189
192
|
|
190
193
|
def check_response(self, response: requests.Response) -> None:
|
191
|
-
"""
|
194
|
+
"""
|
195
|
+
Check the status code and raise on failure.
|
192
196
|
|
193
197
|
:param response: A requests response object.
|
194
198
|
:raise AirflowException: If the response contains a status code not
|
@@ -207,7 +211,8 @@ class HttpHook(BaseHook):
|
|
207
211
|
prepped_request: requests.PreparedRequest,
|
208
212
|
extra_options: dict[Any, Any],
|
209
213
|
) -> Any:
|
210
|
-
"""
|
214
|
+
"""
|
215
|
+
Grab extra options, actually run the request, and check the result.
|
211
216
|
|
212
217
|
:param session: the session to be used to execute the request
|
213
218
|
:param prepped_request: the prepared request generated in run()
|
@@ -244,7 +249,8 @@ class HttpHook(BaseHook):
|
|
244
249
|
raise ex
|
245
250
|
|
246
251
|
def run_with_advanced_retry(self, _retry_args: dict[Any, Any], *args: Any, **kwargs: Any) -> Any:
|
247
|
-
"""
|
252
|
+
"""
|
253
|
+
Run the hook with retry.
|
248
254
|
|
249
255
|
This is useful for connectors which might be disturbed by intermittent
|
250
256
|
issues and should not instantly fail.
|
@@ -283,7 +289,8 @@ class HttpHook(BaseHook):
|
|
283
289
|
|
284
290
|
|
285
291
|
class HttpAsyncHook(BaseHook):
|
286
|
-
"""
|
292
|
+
"""
|
293
|
+
Interact with HTTP servers asynchronously.
|
287
294
|
|
288
295
|
:param method: the API method to be called
|
289
296
|
:param http_conn_id: http connection id that has the base
|
@@ -323,7 +330,8 @@ class HttpAsyncHook(BaseHook):
|
|
323
330
|
headers: dict[str, Any] | None = None,
|
324
331
|
extra_options: dict[str, Any] | None = None,
|
325
332
|
) -> ClientResponse:
|
326
|
-
"""
|
333
|
+
"""
|
334
|
+
Perform an asynchronous HTTP request call.
|
327
335
|
|
328
336
|
:param endpoint: Endpoint to be called, i.e. ``resource/v1/query?``.
|
329
337
|
:param data: Payload to be uploaded or request parameters.
|
@@ -443,7 +451,8 @@ class HttpAsyncHook(BaseHook):
|
|
443
451
|
return extra
|
444
452
|
|
445
453
|
def _retryable_error_async(self, exception: ClientResponseError) -> bool:
|
446
|
-
"""
|
454
|
+
"""
|
455
|
+
Determine whether an exception may successful on a subsequent attempt.
|
447
456
|
|
448
457
|
It considers the following to be retryable:
|
449
458
|
- requests_exceptions.ConnectionError
|
@@ -231,7 +231,8 @@ class HttpOperator(BaseOperator):
|
|
231
231
|
|
232
232
|
@staticmethod
|
233
233
|
def _default_response_maker(response: Response | list[Response]) -> Callable:
|
234
|
-
"""
|
234
|
+
"""
|
235
|
+
Create a default response maker function based on the type of response.
|
235
236
|
|
236
237
|
:param response: The response object or list of response objects.
|
237
238
|
:return: A function that returns response text(s).
|
@@ -281,7 +282,8 @@ class HttpOperator(BaseOperator):
|
|
281
282
|
)
|
282
283
|
|
283
284
|
def _merge_next_page_parameters(self, next_page_params: dict) -> dict:
|
284
|
-
"""
|
285
|
+
"""
|
286
|
+
Merge initial request parameters with next page parameters.
|
285
287
|
|
286
288
|
Merge initial requests parameters with the ones for the next page, generated by
|
287
289
|
the pagination function. Items in the 'next_page_params' overrides those defined
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: apache-airflow-providers-http
|
3
|
-
Version: 4.
|
3
|
+
Version: 4.13.0
|
4
4
|
Summary: Provider package apache-airflow-providers-http for Apache Airflow
|
5
5
|
Keywords: airflow-provider,http,airflow,integration
|
6
6
|
Author-email: Apache Software Foundation <dev@airflow.apache.org>
|
@@ -22,13 +22,13 @@ Classifier: Programming Language :: Python :: 3.11
|
|
22
22
|
Classifier: Programming Language :: Python :: 3.12
|
23
23
|
Classifier: Topic :: System :: Monitoring
|
24
24
|
Requires-Dist: aiohttp>=3.9.2
|
25
|
-
Requires-Dist: apache-airflow>=2.
|
25
|
+
Requires-Dist: apache-airflow>=2.8.0
|
26
26
|
Requires-Dist: asgiref
|
27
27
|
Requires-Dist: requests>=2.27.0,<3
|
28
28
|
Requires-Dist: requests_toolbelt
|
29
29
|
Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
|
30
|
-
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-http/4.
|
31
|
-
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-http/4.
|
30
|
+
Project-URL: Changelog, https://airflow.apache.org/docs/apache-airflow-providers-http/4.13.0/changelog.html
|
31
|
+
Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-http/4.13.0
|
32
32
|
Project-URL: Slack Chat, https://s.apache.org/airflow-slack
|
33
33
|
Project-URL: Source Code, https://github.com/apache/airflow
|
34
34
|
Project-URL: Twitter, https://twitter.com/ApacheAirflow
|
@@ -78,7 +78,7 @@ Project-URL: YouTube, https://www.youtube.com/channel/UCSXwxpWZQ7XZ1WL3wqevChA/
|
|
78
78
|
|
79
79
|
Package ``apache-airflow-providers-http``
|
80
80
|
|
81
|
-
Release: ``4.
|
81
|
+
Release: ``4.13.0``
|
82
82
|
|
83
83
|
|
84
84
|
`Hypertext Transfer Protocol (HTTP) <https://www.w3.org/Protocols/>`__
|
@@ -91,7 +91,7 @@ This is a provider package for ``http`` provider. All classes for this provider
|
|
91
91
|
are in ``airflow.providers.http`` python package.
|
92
92
|
|
93
93
|
You can find package information and changelog for the provider
|
94
|
-
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-http/4.
|
94
|
+
in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-http/4.13.0/>`_.
|
95
95
|
|
96
96
|
Installation
|
97
97
|
------------
|
@@ -108,7 +108,7 @@ Requirements
|
|
108
108
|
===================== ==================
|
109
109
|
PIP package Version required
|
110
110
|
===================== ==================
|
111
|
-
``apache-airflow`` ``>=2.
|
111
|
+
``apache-airflow`` ``>=2.8.0``
|
112
112
|
``requests`` ``>=2.27.0,<3``
|
113
113
|
``requests_toolbelt``
|
114
114
|
``aiohttp`` ``>=3.9.2``
|
@@ -116,4 +116,4 @@ PIP package Version required
|
|
116
116
|
===================== ==================
|
117
117
|
|
118
118
|
The changelog for the provider package can be found in the
|
119
|
-
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-http/4.
|
119
|
+
`changelog <https://airflow.apache.org/docs/apache-airflow-providers-http/4.13.0/changelog.html>`_.
|
@@ -0,0 +1,15 @@
|
|
1
|
+
airflow/providers/http/LICENSE,sha256=FFb4jd2AXnOOf7XLP04pQW6jbdhG49TxlGY6fFpCV1Y,13609
|
2
|
+
airflow/providers/http/__init__.py,sha256=EGYAdUFvS9N3xT0b9T8aS9IF32vosPRdv-Gsql-wdCQ,1492
|
3
|
+
airflow/providers/http/get_provider_info.py,sha256=-o2_dxQ94Hcc2aLBu8IPaiHRWCok5jHFXnHMY-j92fw,3677
|
4
|
+
airflow/providers/http/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
5
|
+
airflow/providers/http/hooks/http.py,sha256=6YaTHu_gwmAcukS4FOZKvDoYXvS3hw-iwi_8zMalLXw,18850
|
6
|
+
airflow/providers/http/operators/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
7
|
+
airflow/providers/http/operators/http.py,sha256=6iyOv6nh6KDxvyD-xm6YnIy85TKvidKEzDkr-3H3U1I,18224
|
8
|
+
airflow/providers/http/sensors/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
9
|
+
airflow/providers/http/sensors/http.py,sha256=LLrwCko1bqPfiRsWGvG7IVloA-YqV3DgkqqxvOP-Ac4,8109
|
10
|
+
airflow/providers/http/triggers/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
11
|
+
airflow/providers/http/triggers/http.py,sha256=Wp29_-4sUDLqoMX9FREqU64yiDAJEJaXxtmLLgk4hXM,7631
|
12
|
+
apache_airflow_providers_http-4.13.0.dist-info/entry_points.txt,sha256=65Rk4MYlxxtwo7y7-uNv4KS7MfoBnILhMjRQmNbRo1Q,100
|
13
|
+
apache_airflow_providers_http-4.13.0.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
14
|
+
apache_airflow_providers_http-4.13.0.dist-info/METADATA,sha256=o_iVK4-oOq_D9oZP6q3EesgZSN3dMk4wRbmg-Hvhz3E,4932
|
15
|
+
apache_airflow_providers_http-4.13.0.dist-info/RECORD,,
|
@@ -1,15 +0,0 @@
|
|
1
|
-
airflow/providers/http/LICENSE,sha256=FFb4jd2AXnOOf7XLP04pQW6jbdhG49TxlGY6fFpCV1Y,13609
|
2
|
-
airflow/providers/http/__init__.py,sha256=jrK294-eF84O4Ui9pB0gKcNxFX0gRF2BRJC63ICMQhI,1492
|
3
|
-
airflow/providers/http/get_provider_info.py,sha256=SA-JTSoROGMsRkKn6UdCjNOLrduy4hbSCaZhaKvg3t0,3655
|
4
|
-
airflow/providers/http/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
5
|
-
airflow/providers/http/hooks/http.py,sha256=rt6gH-1RiQEobnuxAECboemhEntXOIjIWaBn-SCoW7Y,18777
|
6
|
-
airflow/providers/http/operators/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
7
|
-
airflow/providers/http/operators/http.py,sha256=D_uaFftgXahh-I96AONgnYY3JrgE9fIBf9lNiWWg4G0,18206
|
8
|
-
airflow/providers/http/sensors/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
9
|
-
airflow/providers/http/sensors/http.py,sha256=LLrwCko1bqPfiRsWGvG7IVloA-YqV3DgkqqxvOP-Ac4,8109
|
10
|
-
airflow/providers/http/triggers/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
|
11
|
-
airflow/providers/http/triggers/http.py,sha256=Wp29_-4sUDLqoMX9FREqU64yiDAJEJaXxtmLLgk4hXM,7631
|
12
|
-
apache_airflow_providers_http-4.12.0rc1.dist-info/entry_points.txt,sha256=65Rk4MYlxxtwo7y7-uNv4KS7MfoBnILhMjRQmNbRo1Q,100
|
13
|
-
apache_airflow_providers_http-4.12.0rc1.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
|
14
|
-
apache_airflow_providers_http-4.12.0rc1.dist-info/METADATA,sha256=ri53KGKBfdiiae7ycXo4dBKvvFx2qM21BaM7yRpK3f0,4942
|
15
|
-
apache_airflow_providers_http-4.12.0rc1.dist-info/RECORD,,
|
File without changes
|