PyReverseETL 3.3.0__tar.gz → 3.5.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.
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/Cargo.lock +2 -2
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/Cargo.toml +1 -1
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/PKG-INFO +179 -5
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/README.md +171 -4
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/pyproject.toml +14 -2
- pyreverseetl-3.5.0/python/pyreverseetl/__init__.py +59 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/python/pyreverseetl/cli.py +25 -18
- pyreverseetl-3.5.0/python/pyreverseetl/connectors.py +853 -0
- pyreverseetl-3.5.0/python/pyreverseetl/secure_state.py +127 -0
- pyreverseetl-3.5.0/python/pyreverseetl/singer.py +127 -0
- pyreverseetl-3.3.0/python/pyreverseetl/__init__.py +0 -31
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/LICENSE +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/Cargo.toml +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/benches/load_test.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/bin/pyreverseetl_dashboard.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/activation.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/adapters/alert_compat.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/adapters/error.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/adapters/http_client.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/adapters/hubspot.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/adapters/mapping.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/adapters/marketo.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/adapters/mod.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/adapters/oauth_manager.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/adapters/retry_policy.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/adapters/salesforce.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/adapters/schema_detect.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/adapters/webhook.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/cdc/change_detector.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/cdc/changelog.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/cdc/checkpoint.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/cdc/mod.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/connectors/config.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/connectors/connectors_db.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/connectors/database_advanced.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/connectors/destination.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/connectors/error.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/connectors/hdfs.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/connectors/mod.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/connectors/mysql.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/connectors/object_storage.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/connectors/postgres.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/connectors/rate_limiting.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/connectors/registry.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/connectors/saas.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/connectors/source.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/connectors/web.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/destination.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/dlq.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/entity.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/error.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/executor.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/governance/cached_gate.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/governance/compliance_rules.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/governance/credentials.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/governance/mod.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/governance/quality_gate.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/governance/retry_policy.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/governance/schema_evolution.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/governance/statguardian_client.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/idempotency.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/lib.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/lineage.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/observability/dashboard_launcher.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/observability/logs.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/observability/metrics.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/observability/metrics_server.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/observability/mod.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/observability/traces.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/pipeline/activation_pipeline.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/pipeline/backpressure.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/pipeline/latency_tracker.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/pipeline/mod.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/sources/kafka.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/sources/mod.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/sources/polling.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/sources/sync_config.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/statguardian.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/storage/mod.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/storage/repository.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/storage/schema.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/streaming/event_processor.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/streaming/event_schema.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/streaming/mod.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/streampdf.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/streamxl.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/sync.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/testing/connector_test.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/testing/harness.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/testing/metrics.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/testing/mock_http.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/testing/mod.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/testing/test_data.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/transformers/mod.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/transformers/spark.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/core/src/workflow.rs +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/python/Cargo.toml +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/python/pyreverseetl/server.py +0 -0
- {pyreverseetl-3.3.0 → pyreverseetl-3.5.0}/python/src/lib.rs +0 -0
|
@@ -3199,7 +3199,7 @@ dependencies = [
|
|
|
3199
3199
|
|
|
3200
3200
|
[[package]]
|
|
3201
3201
|
name = "pyreverseetl"
|
|
3202
|
-
version = "3.
|
|
3202
|
+
version = "3.5.0"
|
|
3203
3203
|
dependencies = [
|
|
3204
3204
|
"chrono",
|
|
3205
3205
|
"pyo3",
|
|
@@ -3210,7 +3210,7 @@ dependencies = [
|
|
|
3210
3210
|
|
|
3211
3211
|
[[package]]
|
|
3212
3212
|
name = "pyreverseetl-core"
|
|
3213
|
-
version = "3.
|
|
3213
|
+
version = "3.5.0"
|
|
3214
3214
|
dependencies = [
|
|
3215
3215
|
"async-trait",
|
|
3216
3216
|
"aws-config",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PyReverseETL
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.5.0
|
|
4
4
|
Classifier: Development Status :: 4 - Beta
|
|
5
5
|
Classifier: Intended Audience :: Developers
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -9,9 +9,16 @@ Classifier: Programming Language :: Python :: 3.10
|
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.11
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.12
|
|
11
11
|
Classifier: Programming Language :: Python :: 3.13
|
|
12
|
+
Requires-Dist: cryptography>=42
|
|
13
|
+
Requires-Dist: keyring>=24
|
|
12
14
|
Requires-Dist: pytest>=7.0 ; extra == 'dev'
|
|
13
15
|
Requires-Dist: ruff>=0.6 ; extra == 'dev'
|
|
16
|
+
Requires-Dist: duckdb>=1.0 ; extra == 'dev'
|
|
17
|
+
Requires-Dist: duckdb>=1.0 ; extra == 'duckdb'
|
|
18
|
+
Requires-Dist: psycopg[binary]>=3.1 ; extra == 'postgres'
|
|
14
19
|
Provides-Extra: dev
|
|
20
|
+
Provides-Extra: duckdb
|
|
21
|
+
Provides-Extra: postgres
|
|
15
22
|
License-File: LICENSE
|
|
16
23
|
Summary: The Open Operational Data Activation Runtime
|
|
17
24
|
Author-email: Georgi Mammen Mullassery <mullassery@gmail.com>
|
|
@@ -47,6 +54,11 @@ offered as an option and not silently faked.
|
|
|
47
54
|
- **Real HTTP destinations.** Webhook destination with real auth (Bearer / API key /
|
|
48
55
|
Basic) and JSON payload construction; CRM/marketing-automation REST adapters for
|
|
49
56
|
Salesforce, HubSpot, and Marketo.
|
|
57
|
+
- **Connector plugin SDK (Python path).** A documented `pyreverseetl.connectors`
|
|
58
|
+
entry-point group plus real local SQLite and optional DuckDB source/destination
|
|
59
|
+
connectors, and an optional Postgres `psycopg` skeleton (`run_with_connector`).
|
|
60
|
+
Third-party plugins are Python-level; the Rust `run_sync` engine still owns
|
|
61
|
+
the built-in Postgres/MySQL/S3/webhook/CRM path.
|
|
50
62
|
- **Compliance/PII handling before data leaves the process.** Mask, remove, or truncate
|
|
51
63
|
fields per-record; `Encrypt` is honestly reported as unresolved rather than faked.
|
|
52
64
|
- **Lineage tracking.** Every sync registers real source/destination nodes and appends a
|
|
@@ -73,8 +85,16 @@ offered as an option and not silently faked.
|
|
|
73
85
|
- **Not a Spark/PySpark transform engine.** The transformer is present from earlier work
|
|
74
86
|
but not wired into `execute`/`run_sync`; several such modules return fixed, non-real
|
|
75
87
|
numbers if called directly (documented inline, e.g. `SparkTransformer::submit`).
|
|
76
|
-
- **
|
|
77
|
-
|
|
88
|
+
- **Python connector plugins are not loaded by the Rust core.** `run_sync` accepts
|
|
89
|
+
only its fixed built-in connector set. Plugins registered under
|
|
90
|
+
`pyreverseetl.connectors` run through the Python-level `run_with_connector`
|
|
91
|
+
path, which does not write the Rust lineage graph. See
|
|
92
|
+
[Connector plugins](#connector-plugins-python-path).
|
|
93
|
+
- **StatGuardian gates are CLI-level, not core-level.** `execute-activation`
|
|
94
|
+
supports a live `--statguardian-url` sample gate and a file-based
|
|
95
|
+
`--validation-report` gate. The Rust `run_sync` core itself does not call
|
|
96
|
+
StatGuardian. A real cross-repo test lives in
|
|
97
|
+
`tests/test_statguardian_live.py` (skipped when StatGuardian is not installed).
|
|
78
98
|
- **Not verified against live CRM accounts.** The Salesforce/HubSpot/Marketo adapters are
|
|
79
99
|
real REST clients, but they were verified against local mock HTTP servers that assert
|
|
80
100
|
the exact request shape (no live account was available). Please report request-shape
|
|
@@ -90,11 +110,15 @@ offered as an option and not silently faked.
|
|
|
90
110
|
| MySQL | source + destination | Real, via `sqlx`. Same capabilities as Postgres. Verified with a real MySQL container. |
|
|
91
111
|
| S3 / S3-compatible object storage (MinIO, etc.) | source + destination | Real, via [`aws-sdk-s3`](https://github.com/awslabs/aws-sdk-rust), with a custom-endpoint / path-style option for MinIO. JSON-lines and CSV implemented; Parquet/Avro/ORC/Iceberg/Delta return an explicit "not implemented" error rather than silently no-op'ing. Verified with a real MinIO container. |
|
|
92
112
|
| Webhook | destination | Real HTTP POST/PATCH/DELETE via `reqwest`, with real auth headers (Bearer/API key/Basic) and JSON payload construction. |
|
|
113
|
+
| SQLite (`python/pyreverseetl/connectors.py`) | source + destination | Real local reads/writes via stdlib `sqlite3`, exposed through the Python connector-plugin path (`run_with_connector`), **not** the Rust `run_sync` engine. |
|
|
114
|
+
| DuckDB (`python/pyreverseetl/connectors.py`) | source + destination | Optional real local reads/writes via `duckdb`, including append/replace/upsert, tested against temporary database files. Python plugin path only; install with `PyReverseETL[duckdb]`. |
|
|
115
|
+
| Postgres (`python/pyreverseetl/connectors.py`) | source + destination | Optional `psycopg` skeleton for a local server, including read/append/replace/upsert. Python plugin path only; not live-warehouse support. Install with `PyReverseETL[postgres]`. |
|
|
93
116
|
| CRM (`core/src/adapters/salesforce.rs`) | destination | Real REST API client: OAuth2 token exchange, object-based create/upsert-by-external-ID/delete/describe. Verified against a local mock HTTP server. |
|
|
94
117
|
| CRM (`core/src/adapters/hubspot.rs`) | destination | Real v3-style REST API client (create, upsert-by-ID-property, delete, properties/schema). Verified against a mock server. |
|
|
95
118
|
| Marketing automation (`core/src/adapters/marketo.rs`) | destination | Real REST API client (identity token endpoint, bulk lead create/update, delete, describe). Verified against a mock server. |
|
|
96
119
|
| Other cloud object storage backends | source + destination | **Not implemented.** Returns an explicit error instead of a fake success. |
|
|
97
|
-
|
|
|
120
|
+
| StatGuardian gate | pre-sync gate | Wired in the CLI `execute-activation` path (`--statguardian-url` live `/validate`, or `--validation-report`); not in the Rust `run_sync` core. |
|
|
121
|
+
| Kafka, HDFS, Spark/PySpark transforms, CLI dashboard | — | Present from earlier work, out of scope for this pass, not wired into `execute`/`run_sync`. Treat as experimental. |
|
|
98
122
|
|
|
99
123
|
If you need a connector marked "not implemented" above, that's an honest gap, not a
|
|
100
124
|
documentation oversight — open an issue rather than assuming it works. The exact
|
|
@@ -103,7 +127,7 @@ repeated here to avoid implying vendor endorsement.
|
|
|
103
127
|
|
|
104
128
|
## Project status
|
|
105
129
|
|
|
106
|
-
**Beta.** Version 3.
|
|
130
|
+
**Beta.** Version 3.4.0. The Postgres/MySQL/S3/webhook paths are real and verified against
|
|
107
131
|
real services; the `web` source connector (MudFish-backed site crawling) is implemented
|
|
108
132
|
and unit-tested but not yet exercised end-to-end against a live site; the CRM/marketing
|
|
109
133
|
adapters are real but mock-verified only; several
|
|
@@ -167,6 +191,144 @@ pyreverseetl execute ltv_to_hook --compliance-rules \
|
|
|
167
191
|
'[{"id":"mask_email","rule_type":"pii_masking","target_fields":["email"],"action":{"type":"mask","pattern":"****"}}]'
|
|
168
192
|
```
|
|
169
193
|
|
|
194
|
+
## Singer target protocol
|
|
195
|
+
|
|
196
|
+
Consume Singer NDJSON and forward RECORD batches to a sink:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
cat singer-output.ndjson | pyreverseetl-singer-target --output records.jsonl
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
```python
|
|
203
|
+
from pyreverseetl.singer import run_target, jsonl_sink
|
|
204
|
+
run_target(lines, jsonl_sink("records.jsonl"))
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Supported messages: SCHEMA, RECORD (batched) and STATE (flushes the batch).
|
|
208
|
+
This is a protocol adapter; native Rust connectors remain the execution path.
|
|
209
|
+
|
|
210
|
+
## Connector plugins (Python path)
|
|
211
|
+
|
|
212
|
+
The Rust engine's connector set is fixed, so third-party connectors use a
|
|
213
|
+
separate Python-level interface. A plugin subclasses `BaseConnector` and
|
|
214
|
+
implements `read(config, limit)` and `write(config, rows)`:
|
|
215
|
+
|
|
216
|
+
```python
|
|
217
|
+
from pyreverseetl.connectors import (
|
|
218
|
+
BaseConnector, get_connector, register_connector, run_with_connector,
|
|
219
|
+
)
|
|
220
|
+
|
|
221
|
+
class MyConnector(BaseConnector):
|
|
222
|
+
name = "my_connector"
|
|
223
|
+
|
|
224
|
+
def read(self, config, limit=None):
|
|
225
|
+
return [{"id": 1, "name": "Alice"}] # real I/O here
|
|
226
|
+
|
|
227
|
+
def write(self, config, rows):
|
|
228
|
+
return len(rows) # real I/O here; raise instead of faking a count
|
|
229
|
+
|
|
230
|
+
register_connector("my_connector", MyConnector)
|
|
231
|
+
result = run_with_connector(
|
|
232
|
+
"sqlite",
|
|
233
|
+
{"path": "source.db", "table": "customers"},
|
|
234
|
+
"sqlite",
|
|
235
|
+
{"path": "destination.db", "table": "customers"},
|
|
236
|
+
compliance_rules=[
|
|
237
|
+
{
|
|
238
|
+
"id": "mask_email",
|
|
239
|
+
"rule_type": "pii_masking",
|
|
240
|
+
"target_fields": ["email"],
|
|
241
|
+
"action": {"type": "mask", "pattern": "****"},
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
)
|
|
245
|
+
print(result.rows_read, result.rows_written, result.compliance_violations)
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
`run_with_connector` applies the same mask/remove/truncate actions as the core
|
|
249
|
+
compliance engine; `encrypt` is reported as an unresolved violation, never
|
|
250
|
+
faked. Set `dry_run=True` to read and apply compliance rules without calling
|
|
251
|
+
the destination's `write`.
|
|
252
|
+
|
|
253
|
+
Package a plugin by declaring an entry point (no core changes needed):
|
|
254
|
+
|
|
255
|
+
```toml
|
|
256
|
+
[project.entry-points."pyreverseetl.connectors"]
|
|
257
|
+
my_connector = "my_package.connectors:MyConnector"
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
The bundled `sqlite` connector is a real source/destination backed by stdlib
|
|
261
|
+
`sqlite3` (append, replace, and upsert with `upsert_key`). The optional
|
|
262
|
+
`duckdb` connector mirrors that behavior and is tested against temporary DuckDB
|
|
263
|
+
databases:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
pip install "PyReverseETL[duckdb]"
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
```python
|
|
270
|
+
from pyreverseetl.connectors import run_with_connector
|
|
271
|
+
|
|
272
|
+
result = run_with_connector(
|
|
273
|
+
"duckdb",
|
|
274
|
+
{"path": "source.duckdb", "table": "customers"},
|
|
275
|
+
"duckdb",
|
|
276
|
+
{"path": "destination.duckdb", "table": "customers", "upsert_key": "id"},
|
|
277
|
+
)
|
|
278
|
+
print(result.rows_read, result.rows_written)
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
The optional `postgres` connector is a `psycopg` skeleton for a local server;
|
|
282
|
+
configure it with a `dsn`/`database_url` or host/database/user/password fields:
|
|
283
|
+
|
|
284
|
+
```bash
|
|
285
|
+
pip install "PyReverseETL[postgres]"
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
```python
|
|
289
|
+
result = run_with_connector(
|
|
290
|
+
"postgres",
|
|
291
|
+
{"dsn": "postgresql://user:pass@localhost:5432/demo", "table": "customers"},
|
|
292
|
+
"postgres",
|
|
293
|
+
{"dsn": "postgresql://user:pass@localhost:5432/demo", "table": "customers_copy"},
|
|
294
|
+
)
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
Neither Python driver is bundled. Missing drivers raise a clear install hint,
|
|
298
|
+
and Postgres tests skip unless `PYREVERSEETL_TEST_POSTGRES_DSN` points at a
|
|
299
|
+
reachable local server. Kafka, HDFS, Spark/PySpark transforms, and the CLI
|
|
300
|
+
dashboard remain experimental/unwired; no Python plugin path changes that.
|
|
301
|
+
|
|
302
|
+
## Changelog
|
|
303
|
+
|
|
304
|
+
### 3.4.0
|
|
305
|
+
- `pyreverseetl.connectors` plugin interface with the `pyreverseetl.connectors`
|
|
306
|
+
entry-point group.
|
|
307
|
+
- Real local SQLite source/destination connector (stdlib `sqlite3`) wired into
|
|
308
|
+
the Python-level `run_with_connector` path, including compliance actions and
|
|
309
|
+
dry-run previews.
|
|
310
|
+
- Tests use temporary SQLite databases for real reads/writes; the Rust
|
|
311
|
+
`run_sync` path is unchanged.
|
|
312
|
+
|
|
313
|
+
### 3.3.1
|
|
314
|
+
- Encrypted CLI state (Fernet/keyring) with legacy plaintext migration.
|
|
315
|
+
- Key export/import for backup and recovery.
|
|
316
|
+
- Singer SCHEMA/RECORD/STATE target adapter.
|
|
317
|
+
|
|
318
|
+
## Encrypted local state
|
|
319
|
+
|
|
320
|
+
Workflow/activation credentials are no longer stored as plaintext JSON. The CLI
|
|
321
|
+
state file is encrypted with Fernet; the key lives in the OS keyring, or in
|
|
322
|
+
`PYREVERSEETL_STATE_KEY` for headless CI:
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
export PYREVERSEETL_STATE_KEY="$(python -c 'from cryptography.fernet import Fernet;print(Fernet.generate_key().decode())')"
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
Existing plaintext state is read and transparently re-encrypted on the next
|
|
329
|
+
save. Losing the key means losing the local state file (re-enter credentials);
|
|
330
|
+
the error is explicit rather than silently falling back to plaintext.
|
|
331
|
+
|
|
170
332
|
## Usage
|
|
171
333
|
|
|
172
334
|
### Python API
|
|
@@ -273,6 +435,18 @@ gate, not a full-table scan.
|
|
|
273
435
|
- [COMPLIANCE_CHECKLIST.md](COMPLIANCE_CHECKLIST.md) — compliance posture.
|
|
274
436
|
- [SECURITY.md](SECURITY.md) — how to report a vulnerability.
|
|
275
437
|
|
|
438
|
+
## Known issues and deferred work
|
|
439
|
+
|
|
440
|
+
**Blocked / failed:**
|
|
441
|
+
- Live Salesforce/HubSpot/Marketo verification (no accounts).
|
|
442
|
+
- Scheduler/run-history observability.
|
|
443
|
+
- CDC/streaming.
|
|
444
|
+
|
|
445
|
+
**Rejected / deferred:**
|
|
446
|
+
- Spark transforms and streaming CDC now — outside the proven sync path.
|
|
447
|
+
|
|
448
|
+
Full shipped/blocked/rejected detail: [`QUEUE_STATUS.md`](QUEUE_STATUS.md).
|
|
449
|
+
|
|
276
450
|
## Contributing
|
|
277
451
|
|
|
278
452
|
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines and
|
|
@@ -24,6 +24,11 @@ offered as an option and not silently faked.
|
|
|
24
24
|
- **Real HTTP destinations.** Webhook destination with real auth (Bearer / API key /
|
|
25
25
|
Basic) and JSON payload construction; CRM/marketing-automation REST adapters for
|
|
26
26
|
Salesforce, HubSpot, and Marketo.
|
|
27
|
+
- **Connector plugin SDK (Python path).** A documented `pyreverseetl.connectors`
|
|
28
|
+
entry-point group plus real local SQLite and optional DuckDB source/destination
|
|
29
|
+
connectors, and an optional Postgres `psycopg` skeleton (`run_with_connector`).
|
|
30
|
+
Third-party plugins are Python-level; the Rust `run_sync` engine still owns
|
|
31
|
+
the built-in Postgres/MySQL/S3/webhook/CRM path.
|
|
27
32
|
- **Compliance/PII handling before data leaves the process.** Mask, remove, or truncate
|
|
28
33
|
fields per-record; `Encrypt` is honestly reported as unresolved rather than faked.
|
|
29
34
|
- **Lineage tracking.** Every sync registers real source/destination nodes and appends a
|
|
@@ -50,8 +55,16 @@ offered as an option and not silently faked.
|
|
|
50
55
|
- **Not a Spark/PySpark transform engine.** The transformer is present from earlier work
|
|
51
56
|
but not wired into `execute`/`run_sync`; several such modules return fixed, non-real
|
|
52
57
|
numbers if called directly (documented inline, e.g. `SparkTransformer::submit`).
|
|
53
|
-
- **
|
|
54
|
-
|
|
58
|
+
- **Python connector plugins are not loaded by the Rust core.** `run_sync` accepts
|
|
59
|
+
only its fixed built-in connector set. Plugins registered under
|
|
60
|
+
`pyreverseetl.connectors` run through the Python-level `run_with_connector`
|
|
61
|
+
path, which does not write the Rust lineage graph. See
|
|
62
|
+
[Connector plugins](#connector-plugins-python-path).
|
|
63
|
+
- **StatGuardian gates are CLI-level, not core-level.** `execute-activation`
|
|
64
|
+
supports a live `--statguardian-url` sample gate and a file-based
|
|
65
|
+
`--validation-report` gate. The Rust `run_sync` core itself does not call
|
|
66
|
+
StatGuardian. A real cross-repo test lives in
|
|
67
|
+
`tests/test_statguardian_live.py` (skipped when StatGuardian is not installed).
|
|
55
68
|
- **Not verified against live CRM accounts.** The Salesforce/HubSpot/Marketo adapters are
|
|
56
69
|
real REST clients, but they were verified against local mock HTTP servers that assert
|
|
57
70
|
the exact request shape (no live account was available). Please report request-shape
|
|
@@ -67,11 +80,15 @@ offered as an option and not silently faked.
|
|
|
67
80
|
| MySQL | source + destination | Real, via `sqlx`. Same capabilities as Postgres. Verified with a real MySQL container. |
|
|
68
81
|
| S3 / S3-compatible object storage (MinIO, etc.) | source + destination | Real, via [`aws-sdk-s3`](https://github.com/awslabs/aws-sdk-rust), with a custom-endpoint / path-style option for MinIO. JSON-lines and CSV implemented; Parquet/Avro/ORC/Iceberg/Delta return an explicit "not implemented" error rather than silently no-op'ing. Verified with a real MinIO container. |
|
|
69
82
|
| Webhook | destination | Real HTTP POST/PATCH/DELETE via `reqwest`, with real auth headers (Bearer/API key/Basic) and JSON payload construction. |
|
|
83
|
+
| SQLite (`python/pyreverseetl/connectors.py`) | source + destination | Real local reads/writes via stdlib `sqlite3`, exposed through the Python connector-plugin path (`run_with_connector`), **not** the Rust `run_sync` engine. |
|
|
84
|
+
| DuckDB (`python/pyreverseetl/connectors.py`) | source + destination | Optional real local reads/writes via `duckdb`, including append/replace/upsert, tested against temporary database files. Python plugin path only; install with `PyReverseETL[duckdb]`. |
|
|
85
|
+
| Postgres (`python/pyreverseetl/connectors.py`) | source + destination | Optional `psycopg` skeleton for a local server, including read/append/replace/upsert. Python plugin path only; not live-warehouse support. Install with `PyReverseETL[postgres]`. |
|
|
70
86
|
| CRM (`core/src/adapters/salesforce.rs`) | destination | Real REST API client: OAuth2 token exchange, object-based create/upsert-by-external-ID/delete/describe. Verified against a local mock HTTP server. |
|
|
71
87
|
| CRM (`core/src/adapters/hubspot.rs`) | destination | Real v3-style REST API client (create, upsert-by-ID-property, delete, properties/schema). Verified against a mock server. |
|
|
72
88
|
| Marketing automation (`core/src/adapters/marketo.rs`) | destination | Real REST API client (identity token endpoint, bulk lead create/update, delete, describe). Verified against a mock server. |
|
|
73
89
|
| Other cloud object storage backends | source + destination | **Not implemented.** Returns an explicit error instead of a fake success. |
|
|
74
|
-
|
|
|
90
|
+
| StatGuardian gate | pre-sync gate | Wired in the CLI `execute-activation` path (`--statguardian-url` live `/validate`, or `--validation-report`); not in the Rust `run_sync` core. |
|
|
91
|
+
| Kafka, HDFS, Spark/PySpark transforms, CLI dashboard | — | Present from earlier work, out of scope for this pass, not wired into `execute`/`run_sync`. Treat as experimental. |
|
|
75
92
|
|
|
76
93
|
If you need a connector marked "not implemented" above, that's an honest gap, not a
|
|
77
94
|
documentation oversight — open an issue rather than assuming it works. The exact
|
|
@@ -80,7 +97,7 @@ repeated here to avoid implying vendor endorsement.
|
|
|
80
97
|
|
|
81
98
|
## Project status
|
|
82
99
|
|
|
83
|
-
**Beta.** Version 3.
|
|
100
|
+
**Beta.** Version 3.4.0. The Postgres/MySQL/S3/webhook paths are real and verified against
|
|
84
101
|
real services; the `web` source connector (MudFish-backed site crawling) is implemented
|
|
85
102
|
and unit-tested but not yet exercised end-to-end against a live site; the CRM/marketing
|
|
86
103
|
adapters are real but mock-verified only; several
|
|
@@ -144,6 +161,144 @@ pyreverseetl execute ltv_to_hook --compliance-rules \
|
|
|
144
161
|
'[{"id":"mask_email","rule_type":"pii_masking","target_fields":["email"],"action":{"type":"mask","pattern":"****"}}]'
|
|
145
162
|
```
|
|
146
163
|
|
|
164
|
+
## Singer target protocol
|
|
165
|
+
|
|
166
|
+
Consume Singer NDJSON and forward RECORD batches to a sink:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
cat singer-output.ndjson | pyreverseetl-singer-target --output records.jsonl
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
```python
|
|
173
|
+
from pyreverseetl.singer import run_target, jsonl_sink
|
|
174
|
+
run_target(lines, jsonl_sink("records.jsonl"))
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Supported messages: SCHEMA, RECORD (batched) and STATE (flushes the batch).
|
|
178
|
+
This is a protocol adapter; native Rust connectors remain the execution path.
|
|
179
|
+
|
|
180
|
+
## Connector plugins (Python path)
|
|
181
|
+
|
|
182
|
+
The Rust engine's connector set is fixed, so third-party connectors use a
|
|
183
|
+
separate Python-level interface. A plugin subclasses `BaseConnector` and
|
|
184
|
+
implements `read(config, limit)` and `write(config, rows)`:
|
|
185
|
+
|
|
186
|
+
```python
|
|
187
|
+
from pyreverseetl.connectors import (
|
|
188
|
+
BaseConnector, get_connector, register_connector, run_with_connector,
|
|
189
|
+
)
|
|
190
|
+
|
|
191
|
+
class MyConnector(BaseConnector):
|
|
192
|
+
name = "my_connector"
|
|
193
|
+
|
|
194
|
+
def read(self, config, limit=None):
|
|
195
|
+
return [{"id": 1, "name": "Alice"}] # real I/O here
|
|
196
|
+
|
|
197
|
+
def write(self, config, rows):
|
|
198
|
+
return len(rows) # real I/O here; raise instead of faking a count
|
|
199
|
+
|
|
200
|
+
register_connector("my_connector", MyConnector)
|
|
201
|
+
result = run_with_connector(
|
|
202
|
+
"sqlite",
|
|
203
|
+
{"path": "source.db", "table": "customers"},
|
|
204
|
+
"sqlite",
|
|
205
|
+
{"path": "destination.db", "table": "customers"},
|
|
206
|
+
compliance_rules=[
|
|
207
|
+
{
|
|
208
|
+
"id": "mask_email",
|
|
209
|
+
"rule_type": "pii_masking",
|
|
210
|
+
"target_fields": ["email"],
|
|
211
|
+
"action": {"type": "mask", "pattern": "****"},
|
|
212
|
+
}
|
|
213
|
+
],
|
|
214
|
+
)
|
|
215
|
+
print(result.rows_read, result.rows_written, result.compliance_violations)
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
`run_with_connector` applies the same mask/remove/truncate actions as the core
|
|
219
|
+
compliance engine; `encrypt` is reported as an unresolved violation, never
|
|
220
|
+
faked. Set `dry_run=True` to read and apply compliance rules without calling
|
|
221
|
+
the destination's `write`.
|
|
222
|
+
|
|
223
|
+
Package a plugin by declaring an entry point (no core changes needed):
|
|
224
|
+
|
|
225
|
+
```toml
|
|
226
|
+
[project.entry-points."pyreverseetl.connectors"]
|
|
227
|
+
my_connector = "my_package.connectors:MyConnector"
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
The bundled `sqlite` connector is a real source/destination backed by stdlib
|
|
231
|
+
`sqlite3` (append, replace, and upsert with `upsert_key`). The optional
|
|
232
|
+
`duckdb` connector mirrors that behavior and is tested against temporary DuckDB
|
|
233
|
+
databases:
|
|
234
|
+
|
|
235
|
+
```bash
|
|
236
|
+
pip install "PyReverseETL[duckdb]"
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
```python
|
|
240
|
+
from pyreverseetl.connectors import run_with_connector
|
|
241
|
+
|
|
242
|
+
result = run_with_connector(
|
|
243
|
+
"duckdb",
|
|
244
|
+
{"path": "source.duckdb", "table": "customers"},
|
|
245
|
+
"duckdb",
|
|
246
|
+
{"path": "destination.duckdb", "table": "customers", "upsert_key": "id"},
|
|
247
|
+
)
|
|
248
|
+
print(result.rows_read, result.rows_written)
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
The optional `postgres` connector is a `psycopg` skeleton for a local server;
|
|
252
|
+
configure it with a `dsn`/`database_url` or host/database/user/password fields:
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
pip install "PyReverseETL[postgres]"
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
```python
|
|
259
|
+
result = run_with_connector(
|
|
260
|
+
"postgres",
|
|
261
|
+
{"dsn": "postgresql://user:pass@localhost:5432/demo", "table": "customers"},
|
|
262
|
+
"postgres",
|
|
263
|
+
{"dsn": "postgresql://user:pass@localhost:5432/demo", "table": "customers_copy"},
|
|
264
|
+
)
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Neither Python driver is bundled. Missing drivers raise a clear install hint,
|
|
268
|
+
and Postgres tests skip unless `PYREVERSEETL_TEST_POSTGRES_DSN` points at a
|
|
269
|
+
reachable local server. Kafka, HDFS, Spark/PySpark transforms, and the CLI
|
|
270
|
+
dashboard remain experimental/unwired; no Python plugin path changes that.
|
|
271
|
+
|
|
272
|
+
## Changelog
|
|
273
|
+
|
|
274
|
+
### 3.4.0
|
|
275
|
+
- `pyreverseetl.connectors` plugin interface with the `pyreverseetl.connectors`
|
|
276
|
+
entry-point group.
|
|
277
|
+
- Real local SQLite source/destination connector (stdlib `sqlite3`) wired into
|
|
278
|
+
the Python-level `run_with_connector` path, including compliance actions and
|
|
279
|
+
dry-run previews.
|
|
280
|
+
- Tests use temporary SQLite databases for real reads/writes; the Rust
|
|
281
|
+
`run_sync` path is unchanged.
|
|
282
|
+
|
|
283
|
+
### 3.3.1
|
|
284
|
+
- Encrypted CLI state (Fernet/keyring) with legacy plaintext migration.
|
|
285
|
+
- Key export/import for backup and recovery.
|
|
286
|
+
- Singer SCHEMA/RECORD/STATE target adapter.
|
|
287
|
+
|
|
288
|
+
## Encrypted local state
|
|
289
|
+
|
|
290
|
+
Workflow/activation credentials are no longer stored as plaintext JSON. The CLI
|
|
291
|
+
state file is encrypted with Fernet; the key lives in the OS keyring, or in
|
|
292
|
+
`PYREVERSEETL_STATE_KEY` for headless CI:
|
|
293
|
+
|
|
294
|
+
```bash
|
|
295
|
+
export PYREVERSEETL_STATE_KEY="$(python -c 'from cryptography.fernet import Fernet;print(Fernet.generate_key().decode())')"
|
|
296
|
+
```
|
|
297
|
+
|
|
298
|
+
Existing plaintext state is read and transparently re-encrypted on the next
|
|
299
|
+
save. Losing the key means losing the local state file (re-enter credentials);
|
|
300
|
+
the error is explicit rather than silently falling back to plaintext.
|
|
301
|
+
|
|
147
302
|
## Usage
|
|
148
303
|
|
|
149
304
|
### Python API
|
|
@@ -250,6 +405,18 @@ gate, not a full-table scan.
|
|
|
250
405
|
- [COMPLIANCE_CHECKLIST.md](COMPLIANCE_CHECKLIST.md) — compliance posture.
|
|
251
406
|
- [SECURITY.md](SECURITY.md) — how to report a vulnerability.
|
|
252
407
|
|
|
408
|
+
## Known issues and deferred work
|
|
409
|
+
|
|
410
|
+
**Blocked / failed:**
|
|
411
|
+
- Live Salesforce/HubSpot/Marketo verification (no accounts).
|
|
412
|
+
- Scheduler/run-history observability.
|
|
413
|
+
- CDC/streaming.
|
|
414
|
+
|
|
415
|
+
**Rejected / deferred:**
|
|
416
|
+
- Spark transforms and streaming CDC now — outside the proven sync path.
|
|
417
|
+
|
|
418
|
+
Full shipped/blocked/rejected detail: [`QUEUE_STATUS.md`](QUEUE_STATUS.md).
|
|
419
|
+
|
|
253
420
|
## Contributing
|
|
254
421
|
|
|
255
422
|
See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines and
|
|
@@ -4,11 +4,15 @@ build-backend = "maturin"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "PyReverseETL"
|
|
7
|
-
version = "3.
|
|
7
|
+
version = "3.5.0"
|
|
8
8
|
description = "The Open Operational Data Activation Runtime"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = "Apache-2.0"
|
|
11
11
|
authors = [{ name = "Georgi Mammen Mullassery", email = "mullassery@gmail.com" }]
|
|
12
|
+
dependencies = [
|
|
13
|
+
"cryptography>=42",
|
|
14
|
+
"keyring>=24",
|
|
15
|
+
]
|
|
12
16
|
requires-python = ">=3.9"
|
|
13
17
|
classifiers = [
|
|
14
18
|
"Development Status :: 4 - Beta",
|
|
@@ -22,10 +26,18 @@ classifiers = [
|
|
|
22
26
|
]
|
|
23
27
|
|
|
24
28
|
[project.optional-dependencies]
|
|
25
|
-
|
|
29
|
+
duckdb = ["duckdb>=1.0"]
|
|
30
|
+
postgres = ["psycopg[binary]>=3.1"]
|
|
31
|
+
dev = ["pytest>=7.0", "ruff>=0.6", "duckdb>=1.0"]
|
|
26
32
|
|
|
27
33
|
[project.scripts]
|
|
28
34
|
pyreverseetl = "pyreverseetl.cli:main"
|
|
35
|
+
pyreverseetl-singer-target = "pyreverseetl.singer:main"
|
|
36
|
+
|
|
37
|
+
[project.entry-points."pyreverseetl.connectors"]
|
|
38
|
+
sqlite = "pyreverseetl.connectors:SQLiteConnector"
|
|
39
|
+
duckdb = "pyreverseetl.connectors:DuckDBConnector"
|
|
40
|
+
postgres = "pyreverseetl.connectors:PostgresConnector"
|
|
29
41
|
|
|
30
42
|
[tool.maturin]
|
|
31
43
|
module-name = "pyreverseetl._core"
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"""PyReverseETL: The Open Operational Data Activation Runtime.
|
|
2
|
+
|
|
3
|
+
Re-exports the compiled Rust core's public classes so they're reachable as
|
|
4
|
+
`pyreverseetl.X` instead of requiring `pyreverseetl._core.X`.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from ._core import (
|
|
8
|
+
PyActivation,
|
|
9
|
+
PyDestination,
|
|
10
|
+
PyEntity,
|
|
11
|
+
PySyncResult,
|
|
12
|
+
PySyncRun,
|
|
13
|
+
PyWorkflow,
|
|
14
|
+
__version__,
|
|
15
|
+
lineage_dot,
|
|
16
|
+
lineage_json,
|
|
17
|
+
run_sync,
|
|
18
|
+
)
|
|
19
|
+
from .connectors import (
|
|
20
|
+
BaseConnector,
|
|
21
|
+
ConnectorError,
|
|
22
|
+
ConnectorSyncResult,
|
|
23
|
+
DuckDBConnector,
|
|
24
|
+
PostgresConnector,
|
|
25
|
+
SQLiteConnector,
|
|
26
|
+
available_connectors,
|
|
27
|
+
get_connector,
|
|
28
|
+
register_connector,
|
|
29
|
+
run_with_connector,
|
|
30
|
+
)
|
|
31
|
+
from .singer import SingerBatch, SingerSchema, jsonl_sink, parse_messages, run_target
|
|
32
|
+
|
|
33
|
+
__all__ = [
|
|
34
|
+
"BaseConnector",
|
|
35
|
+
"ConnectorError",
|
|
36
|
+
"ConnectorSyncResult",
|
|
37
|
+
"DuckDBConnector",
|
|
38
|
+
"PostgresConnector",
|
|
39
|
+
"PyActivation",
|
|
40
|
+
"PyDestination",
|
|
41
|
+
"PyEntity",
|
|
42
|
+
"PySyncResult",
|
|
43
|
+
"PySyncRun",
|
|
44
|
+
"PyWorkflow",
|
|
45
|
+
"SQLiteConnector",
|
|
46
|
+
"SingerBatch",
|
|
47
|
+
"SingerSchema",
|
|
48
|
+
"__version__",
|
|
49
|
+
"available_connectors",
|
|
50
|
+
"get_connector",
|
|
51
|
+
"jsonl_sink",
|
|
52
|
+
"lineage_dot",
|
|
53
|
+
"lineage_json",
|
|
54
|
+
"parse_messages",
|
|
55
|
+
"register_connector",
|
|
56
|
+
"run_sync",
|
|
57
|
+
"run_target",
|
|
58
|
+
"run_with_connector",
|
|
59
|
+
]
|
|
@@ -103,25 +103,20 @@ class CLIInterface:
|
|
|
103
103
|
self._load_state()
|
|
104
104
|
|
|
105
105
|
def _load_state(self):
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
except (FileNotFoundError, json.JSONDecodeError):
|
|
113
|
-
pass
|
|
106
|
+
from .secure_state import load_state
|
|
107
|
+
|
|
108
|
+
data = load_state(self.state_path)
|
|
109
|
+
self.workflows = data.get("workflows", {})
|
|
110
|
+
self.activations = data.get("activations", {})
|
|
111
|
+
self.runs = data.get("runs", {})
|
|
114
112
|
|
|
115
113
|
def _save_state(self):
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
f,
|
|
123
|
-
indent=2,
|
|
124
|
-
)
|
|
114
|
+
from .secure_state import save_state
|
|
115
|
+
|
|
116
|
+
save_state(
|
|
117
|
+
self.state_path,
|
|
118
|
+
{"workflows": self.workflows, "activations": self.activations, "runs": self.runs},
|
|
119
|
+
)
|
|
125
120
|
|
|
126
121
|
def create_workflow(
|
|
127
122
|
self,
|
|
@@ -639,6 +634,14 @@ def main():
|
|
|
639
634
|
sys.exit(1)
|
|
640
635
|
statguardian_limit = int(sys.argv[idx + 1])
|
|
641
636
|
|
|
637
|
+
output_path = None
|
|
638
|
+
if "--output" in sys.argv:
|
|
639
|
+
idx = sys.argv.index("--output")
|
|
640
|
+
if idx + 1 >= len(sys.argv):
|
|
641
|
+
print(json.dumps({"error": "--output requires a file path"}))
|
|
642
|
+
sys.exit(1)
|
|
643
|
+
output_path = sys.argv[idx + 1]
|
|
644
|
+
|
|
642
645
|
result = cli.execute_activation(
|
|
643
646
|
activation_id,
|
|
644
647
|
limit,
|
|
@@ -651,6 +654,10 @@ def main():
|
|
|
651
654
|
statguardian_url,
|
|
652
655
|
statguardian_limit,
|
|
653
656
|
)
|
|
657
|
+
if output_path:
|
|
658
|
+
with open(output_path, "w", encoding="utf-8") as handle:
|
|
659
|
+
json.dump(result, handle, indent=2)
|
|
660
|
+
handle.write("\n")
|
|
654
661
|
print(json.dumps(result))
|
|
655
662
|
|
|
656
663
|
elif command == "status":
|
|
@@ -746,7 +753,7 @@ COMMANDS:
|
|
|
746
753
|
pyreverseetl create-activation ltv_to_hook ltv_sync webhook \\
|
|
747
754
|
--dest-config '{"url":"https://example.com/hook","auth":{"type":"bearer","token":"secret"}}'
|
|
748
755
|
|
|
749
|
-
execute <activation_id> [limit] [--compliance-rules <json|@file>] [--dry-run] [--schema-store <path>] [--idempotency-store <path>] [--dlq-store <path>]
|
|
756
|
+
execute <activation_id> [limit] [--compliance-rules <json|@file>] [--dry-run] [--schema-store <path>] [--idempotency-store <path>] [--dlq-store <path>] [--output <path>]
|
|
750
757
|
Execute a REAL data synchronization through the Rust engine
|
|
751
758
|
- activation_id: Activation to execute (required)
|
|
752
759
|
- limit: Max rows to read from the source (optional)
|