PyReverseETL 3.3.1__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.1 → pyreverseetl-3.5.0}/Cargo.lock +2 -2
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/Cargo.toml +1 -1
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/PKG-INFO +128 -5
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/README.md +122 -4
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/pyproject.toml +10 -2
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/python/pyreverseetl/__init__.py +27 -5
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/python/pyreverseetl/cli.py +13 -1
- pyreverseetl-3.5.0/python/pyreverseetl/connectors.py +853 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/python/pyreverseetl/secure_state.py +3 -1
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/python/pyreverseetl/singer.py +17 -4
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/LICENSE +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/Cargo.toml +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/benches/load_test.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/bin/pyreverseetl_dashboard.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/activation.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/adapters/alert_compat.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/adapters/error.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/adapters/http_client.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/adapters/hubspot.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/adapters/mapping.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/adapters/marketo.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/adapters/mod.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/adapters/oauth_manager.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/adapters/retry_policy.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/adapters/salesforce.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/adapters/schema_detect.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/adapters/webhook.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/cdc/change_detector.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/cdc/changelog.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/cdc/checkpoint.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/cdc/mod.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/connectors/config.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/connectors/connectors_db.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/connectors/database_advanced.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/connectors/destination.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/connectors/error.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/connectors/hdfs.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/connectors/mod.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/connectors/mysql.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/connectors/object_storage.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/connectors/postgres.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/connectors/rate_limiting.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/connectors/registry.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/connectors/saas.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/connectors/source.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/connectors/web.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/destination.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/dlq.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/entity.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/error.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/executor.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/governance/cached_gate.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/governance/compliance_rules.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/governance/credentials.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/governance/mod.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/governance/quality_gate.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/governance/retry_policy.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/governance/schema_evolution.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/governance/statguardian_client.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/idempotency.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/lib.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/lineage.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/observability/dashboard_launcher.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/observability/logs.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/observability/metrics.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/observability/metrics_server.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/observability/mod.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/observability/traces.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/pipeline/activation_pipeline.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/pipeline/backpressure.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/pipeline/latency_tracker.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/pipeline/mod.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/sources/kafka.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/sources/mod.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/sources/polling.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/sources/sync_config.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/statguardian.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/storage/mod.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/storage/repository.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/storage/schema.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/streaming/event_processor.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/streaming/event_schema.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/streaming/mod.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/streampdf.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/streamxl.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/sync.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/testing/connector_test.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/testing/harness.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/testing/metrics.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/testing/mock_http.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/testing/mod.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/testing/test_data.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/transformers/mod.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/transformers/spark.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/core/src/workflow.rs +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/python/Cargo.toml +0 -0
- {pyreverseetl-3.3.1 → pyreverseetl-3.5.0}/python/pyreverseetl/server.py +0 -0
- {pyreverseetl-3.3.1 → 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
|
|
@@ -13,7 +13,12 @@ Requires-Dist: cryptography>=42
|
|
|
13
13
|
Requires-Dist: keyring>=24
|
|
14
14
|
Requires-Dist: pytest>=7.0 ; extra == 'dev'
|
|
15
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'
|
|
16
19
|
Provides-Extra: dev
|
|
20
|
+
Provides-Extra: duckdb
|
|
21
|
+
Provides-Extra: postgres
|
|
17
22
|
License-File: LICENSE
|
|
18
23
|
Summary: The Open Operational Data Activation Runtime
|
|
19
24
|
Author-email: Georgi Mammen Mullassery <mullassery@gmail.com>
|
|
@@ -49,6 +54,11 @@ offered as an option and not silently faked.
|
|
|
49
54
|
- **Real HTTP destinations.** Webhook destination with real auth (Bearer / API key /
|
|
50
55
|
Basic) and JSON payload construction; CRM/marketing-automation REST adapters for
|
|
51
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.
|
|
52
62
|
- **Compliance/PII handling before data leaves the process.** Mask, remove, or truncate
|
|
53
63
|
fields per-record; `Encrypt` is honestly reported as unresolved rather than faked.
|
|
54
64
|
- **Lineage tracking.** Every sync registers real source/destination nodes and appends a
|
|
@@ -75,8 +85,16 @@ offered as an option and not silently faked.
|
|
|
75
85
|
- **Not a Spark/PySpark transform engine.** The transformer is present from earlier work
|
|
76
86
|
but not wired into `execute`/`run_sync`; several such modules return fixed, non-real
|
|
77
87
|
numbers if called directly (documented inline, e.g. `SparkTransformer::submit`).
|
|
78
|
-
- **
|
|
79
|
-
|
|
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).
|
|
80
98
|
- **Not verified against live CRM accounts.** The Salesforce/HubSpot/Marketo adapters are
|
|
81
99
|
real REST clients, but they were verified against local mock HTTP servers that assert
|
|
82
100
|
the exact request shape (no live account was available). Please report request-shape
|
|
@@ -92,11 +110,15 @@ offered as an option and not silently faked.
|
|
|
92
110
|
| MySQL | source + destination | Real, via `sqlx`. Same capabilities as Postgres. Verified with a real MySQL container. |
|
|
93
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. |
|
|
94
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]`. |
|
|
95
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. |
|
|
96
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. |
|
|
97
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. |
|
|
98
119
|
| Other cloud object storage backends | source + destination | **Not implemented.** Returns an explicit error instead of a fake success. |
|
|
99
|
-
|
|
|
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. |
|
|
100
122
|
|
|
101
123
|
If you need a connector marked "not implemented" above, that's an honest gap, not a
|
|
102
124
|
documentation oversight — open an issue rather than assuming it works. The exact
|
|
@@ -105,7 +127,7 @@ repeated here to avoid implying vendor endorsement.
|
|
|
105
127
|
|
|
106
128
|
## Project status
|
|
107
129
|
|
|
108
|
-
**Beta.** Version 3.
|
|
130
|
+
**Beta.** Version 3.4.0. The Postgres/MySQL/S3/webhook paths are real and verified against
|
|
109
131
|
real services; the `web` source connector (MudFish-backed site crawling) is implemented
|
|
110
132
|
and unit-tested but not yet exercised end-to-end against a live site; the CRM/marketing
|
|
111
133
|
adapters are real but mock-verified only; several
|
|
@@ -185,8 +207,109 @@ run_target(lines, jsonl_sink("records.jsonl"))
|
|
|
185
207
|
Supported messages: SCHEMA, RECORD (batched) and STATE (flushes the batch).
|
|
186
208
|
This is a protocol adapter; native Rust connectors remain the execution path.
|
|
187
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
|
+
|
|
188
302
|
## Changelog
|
|
189
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
|
+
|
|
190
313
|
### 3.3.1
|
|
191
314
|
- Encrypted CLI state (Fernet/keyring) with legacy plaintext migration.
|
|
192
315
|
- Key export/import for backup and recovery.
|
|
@@ -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
|
|
@@ -160,8 +177,109 @@ run_target(lines, jsonl_sink("records.jsonl"))
|
|
|
160
177
|
Supported messages: SCHEMA, RECORD (batched) and STATE (flushes the batch).
|
|
161
178
|
This is a protocol adapter; native Rust connectors remain the execution path.
|
|
162
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
|
+
|
|
163
272
|
## Changelog
|
|
164
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
|
+
|
|
165
283
|
### 3.3.1
|
|
166
284
|
- Encrypted CLI state (Fernet/keyring) with legacy plaintext migration.
|
|
167
285
|
- Key export/import for backup and recovery.
|
|
@@ -4,7 +4,7 @@ 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"
|
|
@@ -26,10 +26,18 @@ classifiers = [
|
|
|
26
26
|
]
|
|
27
27
|
|
|
28
28
|
[project.optional-dependencies]
|
|
29
|
-
|
|
29
|
+
duckdb = ["duckdb>=1.0"]
|
|
30
|
+
postgres = ["psycopg[binary]>=3.1"]
|
|
31
|
+
dev = ["pytest>=7.0", "ruff>=0.6", "duckdb>=1.0"]
|
|
30
32
|
|
|
31
33
|
[project.scripts]
|
|
32
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"
|
|
33
41
|
|
|
34
42
|
[tool.maturin]
|
|
35
43
|
module-name = "pyreverseetl._core"
|
|
@@ -4,7 +4,6 @@ Re-exports the compiled Rust core's public classes so they're reachable as
|
|
|
4
4
|
`pyreverseetl.X` instead of requiring `pyreverseetl._core.X`.
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
|
-
from .singer import SingerBatch, SingerSchema, jsonl_sink, parse_messages, run_target
|
|
8
7
|
from ._core import (
|
|
9
8
|
PyActivation,
|
|
10
9
|
PyDestination,
|
|
@@ -17,21 +16,44 @@ from ._core import (
|
|
|
17
16
|
lineage_json,
|
|
18
17
|
run_sync,
|
|
19
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
|
|
20
32
|
|
|
21
33
|
__all__ = [
|
|
34
|
+
"BaseConnector",
|
|
35
|
+
"ConnectorError",
|
|
36
|
+
"ConnectorSyncResult",
|
|
37
|
+
"DuckDBConnector",
|
|
38
|
+
"PostgresConnector",
|
|
22
39
|
"PyActivation",
|
|
23
40
|
"PyDestination",
|
|
24
41
|
"PyEntity",
|
|
25
42
|
"PySyncResult",
|
|
26
43
|
"PySyncRun",
|
|
27
44
|
"PyWorkflow",
|
|
45
|
+
"SQLiteConnector",
|
|
46
|
+
"SingerBatch",
|
|
47
|
+
"SingerSchema",
|
|
28
48
|
"__version__",
|
|
49
|
+
"available_connectors",
|
|
50
|
+
"get_connector",
|
|
51
|
+
"jsonl_sink",
|
|
29
52
|
"lineage_dot",
|
|
30
53
|
"lineage_json",
|
|
31
|
-
"run_sync",
|
|
32
|
-
"SingerBatch",
|
|
33
|
-
"SingerSchema",
|
|
34
54
|
"parse_messages",
|
|
55
|
+
"register_connector",
|
|
56
|
+
"run_sync",
|
|
35
57
|
"run_target",
|
|
36
|
-
"
|
|
58
|
+
"run_with_connector",
|
|
37
59
|
]
|
|
@@ -634,6 +634,14 @@ def main():
|
|
|
634
634
|
sys.exit(1)
|
|
635
635
|
statguardian_limit = int(sys.argv[idx + 1])
|
|
636
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
|
+
|
|
637
645
|
result = cli.execute_activation(
|
|
638
646
|
activation_id,
|
|
639
647
|
limit,
|
|
@@ -646,6 +654,10 @@ def main():
|
|
|
646
654
|
statguardian_url,
|
|
647
655
|
statguardian_limit,
|
|
648
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")
|
|
649
661
|
print(json.dumps(result))
|
|
650
662
|
|
|
651
663
|
elif command == "status":
|
|
@@ -741,7 +753,7 @@ COMMANDS:
|
|
|
741
753
|
pyreverseetl create-activation ltv_to_hook ltv_sync webhook \\
|
|
742
754
|
--dest-config '{"url":"https://example.com/hook","auth":{"type":"bearer","token":"secret"}}'
|
|
743
755
|
|
|
744
|
-
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>]
|
|
745
757
|
Execute a REAL data synchronization through the Rust engine
|
|
746
758
|
- activation_id: Activation to execute (required)
|
|
747
759
|
- limit: Max rows to read from the source (optional)
|