elaunira-airflow-provider-r2index 0.1.0__tar.gz → 0.1.1__tar.gz

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.
@@ -0,0 +1,27 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # Distribution / packaging
7
+ build/
8
+ dist/
9
+ *.egg-info/
10
+ *.egg
11
+
12
+ # Virtual environments
13
+ .venv/
14
+ venv/
15
+
16
+ # IDE
17
+ .idea/
18
+ .vscode/
19
+ *.iml
20
+
21
+ # Testing
22
+ .pytest_cache/
23
+ .coverage
24
+ htmlcov/
25
+
26
+ # OS
27
+ .DS_Store
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Elaunira
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,9 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: elaunira-airflow-provider-r2index
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Airflow provider for Elaunira R2Index connections
5
5
  Project-URL: Repository, https://github.com/elaunira/elaunira-airflow-provider-r2index
6
6
  License-Expression: MIT
7
+ License-File: LICENSE
7
8
  Requires-Python: >=3.12
8
9
  Requires-Dist: apache-airflow-providers-hashicorp
9
10
  Requires-Dist: apache-airflow>=3.0.0
@@ -0,0 +1,75 @@
1
+ # Elaunira Airflow Provider for R2Index
2
+
3
+ Airflow provider package that adds the **Elaunira R2Index** connection type for managing R2Index credentials.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install elaunira-airflow-provider-r2index
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ After installation, a new connection type **Elaunira R2Index** will be available in Airflow's connection UI.
14
+
15
+ ### Connection Configuration
16
+
17
+ The connection supports two modes:
18
+
19
+ #### 1. Vault/OpenBao Mode (Recommended)
20
+
21
+ Fetches credentials dynamically from HashiCorp Vault or OpenBao:
22
+
23
+ | Field | Description |
24
+ |-------|-------------|
25
+ | Vault Connection ID | Airflow Vault connection ID (e.g., `openbao-ipregistry`) |
26
+ | Vault Namespace | OpenBao namespace (e.g., `ipregistry/production`) |
27
+ | Vault Secrets (JSON) | JSON mapping of config keys to secret paths |
28
+
29
+ Example Vault Secrets JSON:
30
+ ```json
31
+ {
32
+ "r2index_api_url": "cloudflare/r2index#api-url",
33
+ "r2index_api_token": "cloudflare/r2index#api-token",
34
+ "r2_access_key_id": "cloudflare/r2/airflow#access-key-id",
35
+ "r2_secret_access_key": "cloudflare/r2/airflow#secret-access-key",
36
+ "r2_endpoint_url": "cloudflare/r2/airflow#endpoint-url"
37
+ }
38
+ ```
39
+
40
+ Secret path format: `path#key` (e.g., `cloudflare/r2index#api-url`)
41
+
42
+ #### 2. Direct Mode
43
+
44
+ Store credentials directly in the connection:
45
+
46
+ | Field | Description |
47
+ |-------|-------------|
48
+ | R2Index API URL | API endpoint URL |
49
+ | R2Index API Token | API authentication token |
50
+ | R2 Access Key ID | Cloudflare R2 access key |
51
+ | R2 Secret Access Key | Cloudflare R2 secret key |
52
+ | R2 Endpoint URL | Cloudflare R2 endpoint |
53
+
54
+ ### Environment Variables Fallback
55
+
56
+ If no connection is configured, the hook falls back to environment variables:
57
+
58
+ - `R2INDEX_API_URL`
59
+ - `R2INDEX_API_TOKEN`
60
+ - `R2_ACCESS_KEY_ID`
61
+ - `R2_SECRET_ACCESS_KEY`
62
+ - `R2_ENDPOINT_URL`
63
+
64
+ ## Hook Usage
65
+
66
+ ```python
67
+ from elaunira.airflow.provider.r2index.hooks import R2IndexHook
68
+
69
+ hook = R2IndexHook(r2index_conn_id="my_r2index_connection")
70
+ client = hook.get_conn()
71
+ ```
72
+
73
+ ## License
74
+
75
+ MIT
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "elaunira-airflow-provider-r2index"
7
- version = "0.1.0"
7
+ version = "0.1.1"
8
8
  description = "Airflow provider for Elaunira R2Index connections"
9
9
  requires-python = ">=3.12"
10
10
  license = "MIT"
@@ -6,7 +6,7 @@ import json
6
6
  import os
7
7
  from typing import TYPE_CHECKING, Any
8
8
 
9
- from airflow.hooks.base import BaseHook
9
+ from airflow.sdk.bases.hook import BaseHook
10
10
 
11
11
  if TYPE_CHECKING:
12
12
  from elaunira.r2index import R2IndexClient