apache-airflow-providers-hashicorp 4.3.1rc1__py3-none-any.whl → 4.4.1rc1__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.
@@ -29,11 +29,11 @@ from airflow import __version__ as airflow_version
29
29
 
30
30
  __all__ = ["__version__"]
31
31
 
32
- __version__ = "4.3.1"
32
+ __version__ = "4.4.1"
33
33
 
34
34
  if packaging.version.parse(packaging.version.parse(airflow_version).base_version) < packaging.version.parse(
35
- "2.10.0"
35
+ "2.11.0"
36
36
  ):
37
37
  raise RuntimeError(
38
- f"The package `apache-airflow-providers-hashicorp:{__version__}` needs Apache Airflow 2.10.0+"
38
+ f"The package `apache-airflow-providers-hashicorp:{__version__}` needs Apache Airflow 2.11.0+"
39
39
  )
@@ -23,16 +23,12 @@ from typing import TYPE_CHECKING, Any
23
23
 
24
24
  from hvac.exceptions import VaultError
25
25
 
26
+ from airflow.providers.common.compat.sdk import BaseHook
26
27
  from airflow.providers.hashicorp._internal_client.vault_client import (
27
28
  DEFAULT_KUBERNETES_JWT_PATH,
28
29
  DEFAULT_KV_ENGINE_VERSION,
29
30
  _VaultClient,
30
31
  )
31
-
32
- try:
33
- from airflow.sdk import BaseHook
34
- except ImportError:
35
- from airflow.hooks.base import BaseHook # type: ignore[attr-defined,no-redef]
36
32
  from airflow.utils.helpers import merge_dicts
37
33
 
38
34
  if TYPE_CHECKING:
@@ -93,9 +93,9 @@ class VaultBackend(BaseSecretsBackend, LoggingMixin):
93
93
 
94
94
  def __init__(
95
95
  self,
96
- connections_path: str = "connections",
97
- variables_path: str = "variables",
98
- config_path: str = "config",
96
+ connections_path: str | None = "connections",
97
+ variables_path: str | None = "variables",
98
+ config_path: str | None = "config",
99
99
  url: str | None = None,
100
100
  auth_type: str = "token",
101
101
  auth_mount_point: str | None = None,
@@ -123,18 +123,9 @@ class VaultBackend(BaseSecretsBackend, LoggingMixin):
123
123
  **kwargs,
124
124
  ):
125
125
  super().__init__()
126
- if connections_path is not None:
127
- self.connections_path = connections_path.rstrip("/")
128
- else:
129
- self.connections_path = connections_path
130
- if variables_path is not None:
131
- self.variables_path = variables_path.rstrip("/")
132
- else:
133
- self.variables_path = variables_path
134
- if config_path is not None:
135
- self.config_path = config_path.rstrip("/")
136
- else:
137
- self.config_path = config_path
126
+ self.connections_path = connections_path.rstrip("/") if connections_path is not None else None
127
+ self.variables_path = variables_path.rstrip("/") if variables_path is not None else None
128
+ self.config_path = config_path.rstrip("/") if config_path is not None else None
138
129
  self.mount_point = mount_point
139
130
  self.kv_engine_version = kv_engine_version
140
131
  self.vault_client = _VaultClient(
@@ -217,11 +208,12 @@ class VaultBackend(BaseSecretsBackend, LoggingMixin):
217
208
 
218
209
  return Connection(conn_id, **response)
219
210
 
220
- def get_variable(self, key: str) -> str | None:
211
+ def get_variable(self, key: str, team_name: str | None = None) -> str | None:
221
212
  """
222
213
  Get Airflow Variable.
223
214
 
224
215
  :param key: Variable Key
216
+ :param team_name: Team name associated to the task trying to access the variable (if any)
225
217
  :return: Variable Value retrieved from the vault
226
218
  """
227
219
  mount_point, variable_key = self._parse_path(key)
@@ -0,0 +1,33 @@
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
+
18
+ from __future__ import annotations
19
+
20
+
21
+ def get_base_airflow_version_tuple() -> tuple[int, int, int]:
22
+ from packaging.version import Version
23
+
24
+ from airflow import __version__
25
+
26
+ airflow_version = Version(__version__)
27
+ return airflow_version.major, airflow_version.minor, airflow_version.micro
28
+
29
+
30
+ AIRFLOW_V_3_0_PLUS = get_base_airflow_version_tuple() >= (3, 0, 0)
31
+ AIRFLOW_V_3_1_PLUS: bool = get_base_airflow_version_tuple() >= (3, 1, 0)
32
+
33
+ __all__ = ["AIRFLOW_V_3_0_PLUS", "AIRFLOW_V_3_1_PLUS"]
@@ -1,12 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: apache-airflow-providers-hashicorp
3
- Version: 4.3.1rc1
3
+ Version: 4.4.1rc1
4
4
  Summary: Provider package apache-airflow-providers-hashicorp for Apache Airflow
5
5
  Keywords: airflow-provider,hashicorp,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.10
8
+ Requires-Python: >=3.10
9
9
  Description-Content-Type: text/x-rst
10
+ License-Expression: Apache-2.0
10
11
  Classifier: Development Status :: 5 - Production/Stable
11
12
  Classifier: Environment :: Console
12
13
  Classifier: Environment :: Web Environment
@@ -14,18 +15,21 @@ Classifier: Intended Audience :: Developers
14
15
  Classifier: Intended Audience :: System Administrators
15
16
  Classifier: Framework :: Apache Airflow
16
17
  Classifier: Framework :: Apache Airflow :: Provider
17
- Classifier: License :: OSI Approved :: Apache Software License
18
18
  Classifier: Programming Language :: Python :: 3.10
19
19
  Classifier: Programming Language :: Python :: 3.11
20
20
  Classifier: Programming Language :: Python :: 3.12
21
+ Classifier: Programming Language :: Python :: 3.13
21
22
  Classifier: Topic :: System :: Monitoring
22
- Requires-Dist: apache-airflow>=2.10.0rc1
23
+ License-File: LICENSE
24
+ License-File: NOTICE
25
+ Requires-Dist: apache-airflow>=2.11.0rc1
26
+ Requires-Dist: apache-airflow-providers-common-compat>=1.8.0rc1
23
27
  Requires-Dist: hvac>=1.1.0
24
- Requires-Dist: boto3>=1.33.0 ; extra == "boto3"
28
+ Requires-Dist: boto3>=1.37.2 ; extra == "boto3"
25
29
  Requires-Dist: apache-airflow-providers-google ; extra == "google"
26
30
  Project-URL: Bug Tracker, https://github.com/apache/airflow/issues
27
- Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-hashicorp/4.3.1/changelog.html
28
- Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-hashicorp/4.3.1
31
+ Project-URL: Changelog, https://airflow.staged.apache.org/docs/apache-airflow-providers-hashicorp/4.4.1/changelog.html
32
+ Project-URL: Documentation, https://airflow.staged.apache.org/docs/apache-airflow-providers-hashicorp/4.4.1
29
33
  Project-URL: Mastodon, https://fosstodon.org/@airflow
30
34
  Project-URL: Slack Chat, https://s.apache.org/airflow-slack
31
35
  Project-URL: Source Code, https://github.com/apache/airflow
@@ -58,7 +62,7 @@ Provides-Extra: google
58
62
 
59
63
  Package ``apache-airflow-providers-hashicorp``
60
64
 
61
- Release: ``4.3.1``
65
+ Release: ``4.4.1``
62
66
 
63
67
 
64
68
  Hashicorp including `Hashicorp Vault <https://www.vaultproject.io/>`__
@@ -71,26 +75,27 @@ This is a provider package for ``hashicorp`` provider. All classes for this prov
71
75
  are in ``airflow.providers.hashicorp`` python package.
72
76
 
73
77
  You can find package information and changelog for the provider
74
- in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-hashicorp/4.3.1/>`_.
78
+ in the `documentation <https://airflow.apache.org/docs/apache-airflow-providers-hashicorp/4.4.1/>`_.
75
79
 
76
80
  Installation
77
81
  ------------
78
82
 
79
- You can install this package on top of an existing Airflow 2 installation (see ``Requirements`` below
83
+ You can install this package on top of an existing Airflow installation (see ``Requirements`` below
80
84
  for the minimum Airflow version supported) via
81
85
  ``pip install apache-airflow-providers-hashicorp``
82
86
 
83
- The package supports the following python versions: 3.10,3.11,3.12
87
+ The package supports the following python versions: 3.10,3.11,3.12,3.13
84
88
 
85
89
  Requirements
86
90
  ------------
87
91
 
88
- ================== ==================
89
- PIP package Version required
90
- ================== ==================
91
- ``apache-airflow`` ``>=2.10.0``
92
- ``hvac`` ``>=1.1.0``
93
- ================== ==================
92
+ ========================================== ==================
93
+ PIP package Version required
94
+ ========================================== ==================
95
+ ``apache-airflow`` ``>=2.11.0``
96
+ ``apache-airflow-providers-common-compat`` ``>=1.8.0``
97
+ ``hvac`` ``>=1.1.0``
98
+ ========================================== ==================
94
99
 
95
100
  Cross provider package dependencies
96
101
  -----------------------------------
@@ -102,15 +107,26 @@ You can install such cross-provider dependencies when installing from PyPI. For
102
107
 
103
108
  .. code-block:: bash
104
109
 
105
- pip install apache-airflow-providers-hashicorp[google]
110
+ pip install apache-airflow-providers-hashicorp[common.compat]
106
111
 
107
112
 
108
- ==================================================================================================== ==========
109
- Dependent package Extra
110
- ==================================================================================================== ==========
111
- `apache-airflow-providers-google <https://airflow.apache.org/docs/apache-airflow-providers-google>`_ ``google``
112
- ==================================================================================================== ==========
113
+ ================================================================================================================== =================
114
+ Dependent package Extra
115
+ ================================================================================================================== =================
116
+ `apache-airflow-providers-common-compat <https://airflow.apache.org/docs/apache-airflow-providers-common-compat>`_ ``common.compat``
117
+ `apache-airflow-providers-google <https://airflow.apache.org/docs/apache-airflow-providers-google>`_ ``google``
118
+ ================================================================================================================== =================
119
+
120
+ Optional dependencies
121
+ ----------------------
122
+
123
+ ========== ===================================
124
+ Extra Dependencies
125
+ ========== ===================================
126
+ ``boto3`` ``boto3>=1.37.2``
127
+ ``google`` ``apache-airflow-providers-google``
128
+ ========== ===================================
113
129
 
114
130
  The changelog for the provider package can be found in the
115
- `changelog <https://airflow.apache.org/docs/apache-airflow-providers-hashicorp/4.3.1/changelog.html>`_.
131
+ `changelog <https://airflow.apache.org/docs/apache-airflow-providers-hashicorp/4.4.1/changelog.html>`_.
116
132
 
@@ -0,0 +1,15 @@
1
+ airflow/providers/hashicorp/__init__.py,sha256=75AUU4VIJdK9VexBc4J-qV_MQQmS1k3AQwH2MHghxLY,1498
2
+ airflow/providers/hashicorp/get_provider_info.py,sha256=AFQ7VdRDobAK4-p5A0R9kv4vseR3xtxm7HASrLHThG8,2038
3
+ airflow/providers/hashicorp/version_compat.py,sha256=NMlSRFNSPBEq8-HTJEeIest-4a3o1kxJEIR3Wv69yBE,1285
4
+ airflow/providers/hashicorp/_internal_client/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
5
+ airflow/providers/hashicorp/_internal_client/vault_client.py,sha256=9kcavdjUL_SLE7gUidin01MBHC5QBnY8QChTjaIy1tY,24683
6
+ airflow/providers/hashicorp/hooks/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
7
+ airflow/providers/hashicorp/hooks/vault.py,sha256=xwSg_zM-mCSwqQR64U3wm3_jqKPttx04Ze_OjCTYM5s,18089
8
+ airflow/providers/hashicorp/secrets/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
9
+ airflow/providers/hashicorp/secrets/vault.py,sha256=k7jJZoMlTluKseWB3mBARtRq27hUhLzwbHRaiLAueTg,11506
10
+ apache_airflow_providers_hashicorp-4.4.1rc1.dist-info/entry_points.txt,sha256=M338G3KvFSRu5IqEFm5Qheg_myVuQbsN_2EbAwcgqk4,105
11
+ apache_airflow_providers_hashicorp-4.4.1rc1.dist-info/licenses/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
12
+ apache_airflow_providers_hashicorp-4.4.1rc1.dist-info/licenses/NOTICE,sha256=E3-_E02gwwSEFzeeWPKmnIjOoos3hW28CLISV6sYrbQ,168
13
+ apache_airflow_providers_hashicorp-4.4.1rc1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
14
+ apache_airflow_providers_hashicorp-4.4.1rc1.dist-info/METADATA,sha256=i6HwByOkegZBlzUdfwMI7K2zsQBtruosdYFgRHGDmw0,5852
15
+ apache_airflow_providers_hashicorp-4.4.1rc1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Apache Airflow
2
+ Copyright 2016-2025 The Apache Software Foundation
3
+
4
+ This product includes software developed at
5
+ The Apache Software Foundation (http://www.apache.org/).
@@ -1,13 +0,0 @@
1
- airflow/providers/hashicorp/LICENSE,sha256=gXPVwptPlW1TJ4HSuG5OMPg-a3h43OGMkZRR1rpwfJA,10850
2
- airflow/providers/hashicorp/__init__.py,sha256=GmnqEIZVRmniAtrQAkbSkEo1PQesrEiJzTKEa0RQ5MI,1498
3
- airflow/providers/hashicorp/get_provider_info.py,sha256=AFQ7VdRDobAK4-p5A0R9kv4vseR3xtxm7HASrLHThG8,2038
4
- airflow/providers/hashicorp/_internal_client/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
5
- airflow/providers/hashicorp/_internal_client/vault_client.py,sha256=9kcavdjUL_SLE7gUidin01MBHC5QBnY8QChTjaIy1tY,24683
6
- airflow/providers/hashicorp/hooks/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
7
- airflow/providers/hashicorp/hooks/vault.py,sha256=Iw521CvQQ3xmBSmYCpCBw4E5FeSA1xJwrhzeSyVOyl8,18178
8
- airflow/providers/hashicorp/secrets/__init__.py,sha256=9hdXHABrVpkbpjZgUft39kOFL2xSGeG4GEua0Hmelus,785
9
- airflow/providers/hashicorp/secrets/vault.py,sha256=_7zhXwHZJZb5HqLq1PttcJUz2KshnTygsNx96sUVXD4,11553
10
- apache_airflow_providers_hashicorp-4.3.1rc1.dist-info/entry_points.txt,sha256=M338G3KvFSRu5IqEFm5Qheg_myVuQbsN_2EbAwcgqk4,105
11
- apache_airflow_providers_hashicorp-4.3.1rc1.dist-info/WHEEL,sha256=G2gURzTEtmeR8nrdXUJfNiB3VYVxigPQ-bEQujpNiNs,82
12
- apache_airflow_providers_hashicorp-4.3.1rc1.dist-info/METADATA,sha256=yEqePzsQgtGnnPEvZ4f0WANQpnfhXTB59efuOM20XJM,4997
13
- apache_airflow_providers_hashicorp-4.3.1rc1.dist-info/RECORD,,