apache-airflow-providers-http 4.4.1rc1__py3-none-any.whl → 4.4.2__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.
@@ -28,7 +28,7 @@ import packaging.version
28
28
 
29
29
  __all__ = ["__version__"]
30
30
 
31
- __version__ = "4.4.1"
31
+ __version__ = "4.4.2"
32
32
 
33
33
  try:
34
34
  from airflow import __version__ as airflow_version
@@ -29,6 +29,7 @@ def get_provider_info():
29
29
  "description": "`Hypertext Transfer Protocol (HTTP) <https://www.w3.org/Protocols/>`__\n",
30
30
  "suspended": False,
31
31
  "versions": [
32
+ "4.4.2",
32
33
  "4.4.1",
33
34
  "4.4.0",
34
35
  "4.3.0",
@@ -36,8 +36,7 @@ if TYPE_CHECKING:
36
36
 
37
37
 
38
38
  class HttpHook(BaseHook):
39
- """
40
- Interact with HTTP servers.
39
+ """Interact with HTTP servers.
41
40
 
42
41
  :param method: the API method to be called
43
42
  :param http_conn_id: :ref:`http connection<howto/connection:http>` that has the base
@@ -89,8 +88,7 @@ class HttpHook(BaseHook):
89
88
  # headers may be passed through directly or in the "extra" field in the connection
90
89
  # definition
91
90
  def get_conn(self, headers: dict[Any, Any] | None = None) -> requests.Session:
92
- """
93
- Returns http session for use with requests
91
+ """Create a Requests HTTP session.
94
92
 
95
93
  :param headers: additional headers to be passed through as a dictionary
96
94
  """
@@ -131,8 +129,7 @@ class HttpHook(BaseHook):
131
129
  extra_options: dict[str, Any] | None = None,
132
130
  **request_kwargs: Any,
133
131
  ) -> Any:
134
- r"""
135
- Performs the request
132
+ r"""Perform the request.
136
133
 
137
134
  :param endpoint: the endpoint to be called i.e. resource/v1/query?
138
135
  :param data: payload to be uploaded or request parameters
@@ -169,11 +166,11 @@ class HttpHook(BaseHook):
169
166
  return self.run_and_check(session, prepped_request, extra_options)
170
167
 
171
168
  def check_response(self, response: requests.Response) -> None:
172
- """
173
- Checks the status code and raise an AirflowException exception on non 2XX or 3XX
174
- status codes
169
+ """Check the status code and raise on failure.
175
170
 
176
- :param response: A requests response object
171
+ :param response: A requests response object.
172
+ :raise AirflowException: If the response contains a status code not
173
+ in the 2xx and 3xx range.
177
174
  """
178
175
  try:
179
176
  response.raise_for_status()
@@ -188,9 +185,7 @@ class HttpHook(BaseHook):
188
185
  prepped_request: requests.PreparedRequest,
189
186
  extra_options: dict[Any, Any],
190
187
  ) -> Any:
191
- """
192
- Grabs extra options like timeout and actually runs the request,
193
- checking for the result
188
+ """Grab extra options, actually run the request, and check the result.
194
189
 
195
190
  :param session: the session to be used to execute the request
196
191
  :param prepped_request: the prepared request generated in run()
@@ -227,10 +222,10 @@ class HttpHook(BaseHook):
227
222
  raise ex
228
223
 
229
224
  def run_with_advanced_retry(self, _retry_args: dict[Any, Any], *args: Any, **kwargs: Any) -> Any:
230
- """
231
- Runs Hook.run() with a Tenacity decorator attached to it. This is useful for
232
- connectors which might be disturbed by intermittent issues and should not
233
- instantly fail.
225
+ """Run the hook with retry.
226
+
227
+ This is useful for connectors which might be disturbed by intermittent
228
+ issues and should not instantly fail.
234
229
 
235
230
  :param _retry_args: Arguments which define the retry behaviour.
236
231
  See Tenacity documentation at https://github.com/jd/tenacity
@@ -252,13 +247,13 @@ class HttpHook(BaseHook):
252
247
  return self._retry_obj(self.run, *args, **kwargs)
253
248
 
254
249
  def url_from_endpoint(self, endpoint: str | None) -> str:
255
- """Combine base url with endpoint"""
250
+ """Combine base url with endpoint."""
256
251
  if self.base_url and not self.base_url.endswith("/") and endpoint and not endpoint.startswith("/"):
257
252
  return self.base_url + "/" + endpoint
258
253
  return (self.base_url or "") + (endpoint or "")
259
254
 
260
255
  def test_connection(self):
261
- """Test HTTP Connection"""
256
+ """Test HTTP Connection."""
262
257
  try:
263
258
  self.run()
264
259
  return True, "Connection successfully tested"
@@ -267,8 +262,7 @@ class HttpHook(BaseHook):
267
262
 
268
263
 
269
264
  class HttpAsyncHook(BaseHook):
270
- """
271
- Interact with HTTP servers using Python Async.
265
+ """Interact with HTTP servers asynchronously.
272
266
 
273
267
  :param method: the API method to be called
274
268
  :param http_conn_id: http connection id that has the base
@@ -307,14 +301,14 @@ class HttpAsyncHook(BaseHook):
307
301
  headers: dict[str, Any] | None = None,
308
302
  extra_options: dict[str, Any] | None = None,
309
303
  ) -> ClientResponse:
310
- r"""
311
- Performs an asynchronous HTTP request call
304
+ """Perform an asynchronous HTTP request call.
312
305
 
313
- :param endpoint: the endpoint to be called i.e. resource/v1/query?
314
- :param data: payload to be uploaded or request parameters
315
- :param headers: additional headers to be passed through as a dictionary
306
+ :param endpoint: Endpoint to be called, i.e. ``resource/v1/query?``.
307
+ :param data: Payload to be uploaded or request parameters.
308
+ :param headers: Additional headers to be passed through as a dict.
316
309
  :param extra_options: Additional kwargs to pass when creating a request.
317
- For example, ``run(json=obj)`` is passed as ``aiohttp.ClientSession().get(json=obj)``
310
+ For example, ``run(json=obj)`` is passed as
311
+ ``aiohttp.ClientSession().get(json=obj)``.
318
312
  """
319
313
  extra_options = extra_options or {}
320
314
 
@@ -399,9 +393,7 @@ class HttpAsyncHook(BaseHook):
399
393
  await asyncio.sleep(self.retry_delay)
400
394
 
401
395
  def _retryable_error_async(self, exception: ClientResponseError) -> bool:
402
- """
403
- Determines whether or not an exception that was thrown might be successful
404
- on a subsequent attempt.
396
+ """Determine whether an exception may successful on a subsequent attempt.
405
397
 
406
398
  It considers the following to be retryable:
407
399
  - requests_exceptions.ConnectionError
@@ -31,7 +31,7 @@ if TYPE_CHECKING:
31
31
 
32
32
  class SimpleHttpOperator(BaseOperator):
33
33
  """
34
- Calls an endpoint on an HTTP system to execute an action
34
+ Calls an endpoint on an HTTP system to execute an action.
35
35
 
36
36
  .. seealso::
37
37
  For more information on how to use this operator, take a look at the guide:
@@ -1,13 +1,13 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: apache-airflow-providers-http
3
- Version: 4.4.1rc1
3
+ Version: 4.4.2
4
4
  Summary: Provider for Apache Airflow. Implements apache-airflow-providers-http package
5
5
  Home-page: https://airflow.apache.org/
6
6
  Download-URL: https://archive.apache.org/dist/airflow/providers
7
7
  Author: Apache Software Foundation
8
8
  Author-email: dev@airflow.apache.org
9
9
  License: Apache License 2.0
10
- Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-http/4.4.1/
10
+ Project-URL: Documentation, https://airflow.apache.org/docs/apache-airflow-providers-http/4.4.2/
11
11
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
12
12
  Project-URL: Source Code, https://github.com/apache/airflow
13
13
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
@@ -21,18 +21,17 @@ Classifier: Intended Audience :: System Administrators
21
21
  Classifier: Framework :: Apache Airflow
22
22
  Classifier: Framework :: Apache Airflow :: Provider
23
23
  Classifier: License :: OSI Approved :: Apache Software License
24
- Classifier: Programming Language :: Python :: 3.7
25
24
  Classifier: Programming Language :: Python :: 3.8
26
25
  Classifier: Programming Language :: Python :: 3.9
27
26
  Classifier: Programming Language :: Python :: 3.10
28
27
  Classifier: Programming Language :: Python :: 3.11
29
28
  Classifier: Topic :: System :: Monitoring
30
- Requires-Python: ~=3.7
29
+ Requires-Python: ~=3.8
31
30
  Description-Content-Type: text/x-rst
32
31
  License-File: LICENSE
33
32
  License-File: NOTICE
34
33
  Requires-Dist: aiohttp
35
- Requires-Dist: apache-airflow (>=2.4.0.dev0)
34
+ Requires-Dist: apache-airflow (>=2.4.0)
36
35
  Requires-Dist: asgiref
37
36
  Requires-Dist: requests (>=2.26.0)
38
37
  Requires-Dist: requests-toolbelt
@@ -58,7 +57,7 @@ Requires-Dist: requests-toolbelt
58
57
 
59
58
  Package ``apache-airflow-providers-http``
60
59
 
61
- Release: ``4.4.1rc1``
60
+ Release: ``4.4.2``
62
61
 
63
62
 
64
63
  `Hypertext Transfer Protocol (HTTP) <https://www.w3.org/Protocols/>`__
@@ -71,7 +70,7 @@ This is a provider package for ``http`` provider. All classes for this provider
71
70
  are in ``airflow.providers.http`` python package.
72
71
 
73
72
  You can find package information and changelog for the provider
74
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-http/4.4.1/>`_.
73
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-http/4.4.2/>`_.
75
74
 
76
75
 
77
76
  Installation
@@ -81,7 +80,7 @@ You can install this package on top of an existing Airflow 2 installation (see `
81
80
  for the minimum Airflow version supported) via
82
81
  ``pip install apache-airflow-providers-http``
83
82
 
84
- The package supports the following python versions: 3.7,3.8,3.9,3.10,3.11
83
+ The package supports the following python versions: 3.8,3.9,3.10,3.11
85
84
 
86
85
  Requirements
87
86
  ------------
@@ -122,6 +121,22 @@ PIP package Version required
122
121
  Changelog
123
122
  ---------
124
123
 
124
+ 4.4.2
125
+ .....
126
+
127
+ .. note::
128
+ This release dropped support for Python 3.7
129
+
130
+ Misc
131
+ ~~~~
132
+
133
+ * ``Add note about dropping Python 3.7 for providers (#32015)``
134
+
135
+ .. Below changes are excluded from the changelog. Move them to
136
+ appropriate section above if needed. Do not delete the lines(!):
137
+ * ``Improve docstrings in providers (#31681)``
138
+ * ``Add D400 pydocstyle check - Providers (#31427)``
139
+
125
140
  4.4.1
126
141
  .....
127
142
 
@@ -0,0 +1,15 @@
1
+ airflow/providers/http/__init__.py,sha256=RovxCASU0KO1u41LkZ_0OIhP6bolnA0tfC_m77a-b6E,1529
2
+ airflow/providers/http/get_provider_info.py,sha256=jvhVqgf_5ksgc-ABJO9HWPBsBA-iGEOAFJ4TwLycW_Y,3088
3
+ airflow/providers/http/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
4
+ airflow/providers/http/hooks/http.py,sha256=GMkqhvriXELdPtf_su6TAL6HMKT2mgEzD5kIXZ-lzH8,16171
5
+ airflow/providers/http/operators/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
6
+ airflow/providers/http/operators/http.py,sha256=slD2Fk97DNJk-OO1jwKUpA4WGbXXdEGmJNC-UMGJEXc,5829
7
+ airflow/providers/http/sensors/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
8
+ airflow/providers/http/sensors/http.py,sha256=MzYScvXNkPufXTBJEKDOTS2nHq0L3UHT1YurZgqz8WM,5885
9
+ apache_airflow_providers_http-4.4.2.dist-info/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
10
+ apache_airflow_providers_http-4.4.2.dist-info/METADATA,sha256=lmUBPTdd3obnTaXG6ARvqBgZ_a-PAgZOkC5YzRZIc4Q,12905
11
+ apache_airflow_providers_http-4.4.2.dist-info/NOTICE,sha256=m-6s2XynUxVSUIxO4rVablAZCvFq-wmLrqV91DotRBw,240
12
+ apache_airflow_providers_http-4.4.2.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
13
+ apache_airflow_providers_http-4.4.2.dist-info/entry_points.txt,sha256=QBAvMV6qvNFxV_H4Vk1jDhezZTTrDb1w_QGzLBA3gaA,101
14
+ apache_airflow_providers_http-4.4.2.dist-info/top_level.txt,sha256=OeMVH5md7fr2QQWpnZoOWWxWO-0WH1IP70lpTVwopPg,8
15
+ apache_airflow_providers_http-4.4.2.dist-info/RECORD,,
@@ -1,15 +0,0 @@
1
- airflow/providers/http/__init__.py,sha256=4wpTzgtS98V4VIyuUThSzBiGppZXt9zghM_vYocDQbs,1529
2
- airflow/providers/http/get_provider_info.py,sha256=s3UYjiB0G0XXelJAkPumsbb7GknTiJ06HD_suOSZrIc,3067
3
- airflow/providers/http/hooks/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
4
- airflow/providers/http/hooks/http.py,sha256=C4RRRMMPKKQa4640rF95DXgB1FYKynEQU1Puo7Ysr_w,16287
5
- airflow/providers/http/operators/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
6
- airflow/providers/http/operators/http.py,sha256=xetHBgceHXgHR-MGaed31-3PsM0jh4f1-5dY8YrfvCU,5828
7
- airflow/providers/http/sensors/__init__.py,sha256=mlJxuZLkd5x-iq2SBwD3mvRQpt3YR7wjz_nceyF1IaI,787
8
- airflow/providers/http/sensors/http.py,sha256=MzYScvXNkPufXTBJEKDOTS2nHq0L3UHT1YurZgqz8WM,5885
9
- apache_airflow_providers_http-4.4.1rc1.dist-info/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
10
- apache_airflow_providers_http-4.4.1rc1.dist-info/METADATA,sha256=R3-aF16s-2L2m9NBUB1I6I245hh862kSoKL3EfSUQHQ,12586
11
- apache_airflow_providers_http-4.4.1rc1.dist-info/NOTICE,sha256=m-6s2XynUxVSUIxO4rVablAZCvFq-wmLrqV91DotRBw,240
12
- apache_airflow_providers_http-4.4.1rc1.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
13
- apache_airflow_providers_http-4.4.1rc1.dist-info/entry_points.txt,sha256=QBAvMV6qvNFxV_H4Vk1jDhezZTTrDb1w_QGzLBA3gaA,101
14
- apache_airflow_providers_http-4.4.1rc1.dist-info/top_level.txt,sha256=OeMVH5md7fr2QQWpnZoOWWxWO-0WH1IP70lpTVwopPg,8
15
- apache_airflow_providers_http-4.4.1rc1.dist-info/RECORD,,