metabase-sync 0.2.2__tar.gz → 0.3.0__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.
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/CHANGELOG.md +8 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/PKG-INFO +3 -2
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/README.md +1 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/pyproject.toml +1 -1
- metabase_sync-0.3.0/src/metabase_sync/__init__.py +1 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/cli.py +1 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/client.py +6 -1
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/settings.py +1 -0
- metabase_sync-0.2.2/src/metabase_sync/__init__.py +0 -1
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/.gitignore +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/LICENSE +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/examples/README.md +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/__main__.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/apply/__init__.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/apply/_cards.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/apply/_collections.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/apply/_dashboards.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/apply/_pulses.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/apply/_runner.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/apply/_shared.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/apply/_snippets.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/diff.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/errors.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/export.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/models.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/plan.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/serialize/__init__.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/serialize/canon.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/serialize/cards.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/serialize/collections.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/serialize/dashboards.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/serialize/databases.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/serialize/paths.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/serialize/pulses.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/serialize/snippets.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/serialize/version.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/src/metabase_sync/serialize/yamlio.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/__init__.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/integration/__init__.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/integration/_builders.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/integration/_mb.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/integration/conftest.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/integration/docker-compose.yml +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/integration/test_apply_semantics.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/integration/test_cards.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/integration/test_cli.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/integration/test_dashboards.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/integration/test_export.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/integration/test_pulses.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/integration/test_snippets.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/test_canon.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/test_card_diff.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/test_client_retries.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/test_concurrency.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/test_dashboard_diff.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/test_legacy_query.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/test_paths.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/test_paths_resolve.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/test_preflight.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/test_pulse_diff.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/test_recipients.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/test_state_version.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/test_template_tags.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/test_version_check.py +0 -0
- {metabase_sync-0.2.2 → metabase_sync-0.3.0}/tests/test_yamlio.py +0 -0
|
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.3.0] - 2026-10-27
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`METABASE_HEADERS` sends extra headers on every request**, as a JSON
|
|
15
|
+
object. Use it to reach a Metabase behind an auth proxy such as Google
|
|
16
|
+
Cloud IAP (`{"Authorization": "Bearer <token>"}`).
|
|
17
|
+
|
|
10
18
|
## [0.2.2] — 2026-07-16
|
|
11
19
|
|
|
12
20
|
### Fixed
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: metabase-sync
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Metabase as code: export, plan, and apply dashboards, cards, collections, snippets and pulses via the Metabase REST API.
|
|
5
5
|
Project-URL: Homepage, https://github.com/novucs/metabase-sync
|
|
6
6
|
Project-URL: Repository, https://github.com/novucs/metabase-sync
|
|
@@ -203,6 +203,7 @@ state/
|
|
|
203
203
|
| --- | --- | --- | --- |
|
|
204
204
|
| `METABASE_URL` | yes | — | e.g. `https://metabase.example.com` |
|
|
205
205
|
| `METABASE_API_KEY` | yes | — | Admin API key (see below) |
|
|
206
|
+
| `METABASE_HEADERS` | no | `{}` | JSON object of extra request headers, e.g. `{"Authorization": "Bearer ..."}` for an auth proxy in front of Metabase |
|
|
206
207
|
| `STATE_DIR` | no | `state/` | Relative to CWD |
|
|
207
208
|
| `HTTP_TIMEOUT_S` | no | `120` | Per HTTP request (large cards' `result_metadata` recompute can take time) |
|
|
208
209
|
| `HTTP_MAX_RETRIES` | no | `3` | Retries on 408 / 429 / 502 / 503 / 504 / connection errors |
|
|
@@ -167,6 +167,7 @@ state/
|
|
|
167
167
|
| --- | --- | --- | --- |
|
|
168
168
|
| `METABASE_URL` | yes | — | e.g. `https://metabase.example.com` |
|
|
169
169
|
| `METABASE_API_KEY` | yes | — | Admin API key (see below) |
|
|
170
|
+
| `METABASE_HEADERS` | no | `{}` | JSON object of extra request headers, e.g. `{"Authorization": "Bearer ..."}` for an auth proxy in front of Metabase |
|
|
170
171
|
| `STATE_DIR` | no | `state/` | Relative to CWD |
|
|
171
172
|
| `HTTP_TIMEOUT_S` | no | `120` | Per HTTP request (large cards' `result_metadata` recompute can take time) |
|
|
172
173
|
| `HTTP_MAX_RETRIES` | no | `3` | Retries on 408 / 429 / 502 / 503 / 504 / connection errors |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "metabase-sync"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.3.0"
|
|
4
4
|
description = "Metabase as code: export, plan, and apply dashboards, cards, collections, snippets and pulses via the Metabase REST API."
|
|
5
5
|
readme = { file = "README.md", content-type = "text/markdown" }
|
|
6
6
|
authors = [{ name = "novucs" }]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.3.0"
|
|
@@ -68,10 +68,15 @@ class MetabaseClient:
|
|
|
68
68
|
timeout_s: float = 120.0,
|
|
69
69
|
max_retries: int = 3,
|
|
70
70
|
retry_backoff_s: float = 1.0,
|
|
71
|
+
headers: dict[str, str] | None = None,
|
|
71
72
|
) -> None:
|
|
72
73
|
self._http = httpx.Client(
|
|
73
74
|
base_url=base_url.rstrip("/"),
|
|
74
|
-
headers={
|
|
75
|
+
headers={
|
|
76
|
+
**(headers or {}),
|
|
77
|
+
"X-API-Key": api_key,
|
|
78
|
+
"Accept": "application/json",
|
|
79
|
+
},
|
|
75
80
|
timeout=timeout_s,
|
|
76
81
|
transport=httpx.HTTPTransport(retries=max_retries),
|
|
77
82
|
)
|
|
@@ -22,6 +22,7 @@ class Settings(BaseSettings):
|
|
|
22
22
|
|
|
23
23
|
metabase_url: str
|
|
24
24
|
metabase_api_key: str
|
|
25
|
+
metabase_headers: dict[str, str] = Field(default_factory=dict)
|
|
25
26
|
state_dir: Path = Field(default=Path("state"))
|
|
26
27
|
http_timeout_s: float = Field(default=120.0)
|
|
27
28
|
http_max_retries: int = Field(default=3)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|