dtex 0.1.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.
Files changed (119) hide show
  1. dtex-0.1.0/.gitignore +20 -0
  2. dtex-0.1.0/CONTRIBUTING.md +152 -0
  3. dtex-0.1.0/LICENSE +201 -0
  4. dtex-0.1.0/PKG-INFO +140 -0
  5. dtex-0.1.0/README.md +90 -0
  6. dtex-0.1.0/docs/00-vision-and-naming.md +175 -0
  7. dtex-0.1.0/docs/01-landscape-and-comparison.md +210 -0
  8. dtex-0.1.0/docs/02-architecture.md +305 -0
  9. dtex-0.1.0/docs/03-connector-contract.md +692 -0
  10. dtex-0.1.0/docs/04-connector-body.md +353 -0
  11. dtex-0.1.0/docs/05-destinations-and-state.md +510 -0
  12. dtex-0.1.0/docs/06-project-anatomy.md +313 -0
  13. dtex-0.1.0/docs/07-cli-and-library-api.md +487 -0
  14. dtex-0.1.0/docs/08-security.md +350 -0
  15. dtex-0.1.0/docs/09-logging-and-observability.md +169 -0
  16. dtex-0.1.0/docs/10-roadmap-and-scope.md +93 -0
  17. dtex-0.1.0/docs/11-open-questions.md +254 -0
  18. dtex-0.1.0/docs/12-configs.md +214 -0
  19. dtex-0.1.0/docs/README.md +33 -0
  20. dtex-0.1.0/docs/_archive/stripe-research-2026-05.md +421 -0
  21. dtex-0.1.0/docs/_internal/release.md +107 -0
  22. dtex-0.1.0/dtex/__init__.py +129 -0
  23. dtex-0.1.0/dtex/cli/__init__.py +1255 -0
  24. dtex-0.1.0/dtex/cli/_discovery.py +141 -0
  25. dtex-0.1.0/dtex/cli/_format.py +216 -0
  26. dtex-0.1.0/dtex/cli/_runs.py +301 -0
  27. dtex-0.1.0/dtex/cli/_scaffold.py +383 -0
  28. dtex-0.1.0/dtex/cli/_secrets.py +262 -0
  29. dtex-0.1.0/dtex/cli/_state.py +202 -0
  30. dtex-0.1.0/dtex/destinations/__init__.py +2 -0
  31. dtex-0.1.0/dtex/destinations/bigquery/README.md +162 -0
  32. dtex-0.1.0/dtex/destinations/bigquery/__init__.py +12 -0
  33. dtex-0.1.0/dtex/destinations/bigquery/client.py +324 -0
  34. dtex-0.1.0/dtex/destinations/bigquery/ddl.py +450 -0
  35. dtex-0.1.0/dtex/destinations/bigquery/destination.py +1140 -0
  36. dtex-0.1.0/dtex/destinations/bigquery/register.yaml +72 -0
  37. dtex-0.1.0/dtex/destinations/duckdb/__init__.py +11 -0
  38. dtex-0.1.0/dtex/destinations/duckdb/ddl.py +140 -0
  39. dtex-0.1.0/dtex/destinations/duckdb/destination.py +856 -0
  40. dtex-0.1.0/dtex/destinations/duckdb/register.yaml +27 -0
  41. dtex-0.1.0/dtex/engine/__init__.py +53 -0
  42. dtex-0.1.0/dtex/engine/config.py +672 -0
  43. dtex-0.1.0/dtex/engine/configs.py +151 -0
  44. dtex-0.1.0/dtex/engine/discovery.py +411 -0
  45. dtex-0.1.0/dtex/engine/logger.py +315 -0
  46. dtex-0.1.0/dtex/engine/runner.py +1469 -0
  47. dtex-0.1.0/dtex/py.typed +0 -0
  48. dtex-0.1.0/dtex/registry.py +834 -0
  49. dtex-0.1.0/dtex/secrets/__init__.py +65 -0
  50. dtex-0.1.0/dtex/secrets/_aws.py +432 -0
  51. dtex-0.1.0/dtex/secrets/_gcp.py +312 -0
  52. dtex-0.1.0/dtex/secrets/_vault.py +337 -0
  53. dtex-0.1.0/dtex/secrets/resolvers.py +687 -0
  54. dtex-0.1.0/dtex/sources/__init__.py +2 -0
  55. dtex-0.1.0/dtex/sources/filesystem/README.md +70 -0
  56. dtex-0.1.0/dtex/sources/filesystem/__init__.py +10 -0
  57. dtex-0.1.0/dtex/sources/filesystem/backends.py +437 -0
  58. dtex-0.1.0/dtex/sources/filesystem/readers.py +260 -0
  59. dtex-0.1.0/dtex/sources/filesystem/register.yaml +124 -0
  60. dtex-0.1.0/dtex/sources/filesystem/source.py +236 -0
  61. dtex-0.1.0/dtex/sources/postgres/README.md +109 -0
  62. dtex-0.1.0/dtex/sources/postgres/__init__.py +12 -0
  63. dtex-0.1.0/dtex/sources/postgres/client.py +256 -0
  64. dtex-0.1.0/dtex/sources/postgres/register.yaml +99 -0
  65. dtex-0.1.0/dtex/sources/postgres/source.py +381 -0
  66. dtex-0.1.0/dtex/sources/postgres/type_mapping.py +178 -0
  67. dtex-0.1.0/dtex/sources/rest/README.md +133 -0
  68. dtex-0.1.0/dtex/sources/rest/__init__.py +15 -0
  69. dtex-0.1.0/dtex/sources/rest/client.py +271 -0
  70. dtex-0.1.0/dtex/sources/rest/extractors.py +207 -0
  71. dtex-0.1.0/dtex/sources/rest/pagination.py +469 -0
  72. dtex-0.1.0/dtex/sources/rest/register.yaml +103 -0
  73. dtex-0.1.0/dtex/sources/rest/source.py +239 -0
  74. dtex-0.1.0/dtex/sources/shiphero/README.md +97 -0
  75. dtex-0.1.0/dtex/sources/shiphero/__init__.py +10 -0
  76. dtex-0.1.0/dtex/sources/shiphero/client.py +278 -0
  77. dtex-0.1.0/dtex/sources/shiphero/pagination.py +121 -0
  78. dtex-0.1.0/dtex/sources/shiphero/queries.py +105 -0
  79. dtex-0.1.0/dtex/sources/shiphero/register.yaml +160 -0
  80. dtex-0.1.0/dtex/sources/shiphero/source.py +241 -0
  81. dtex-0.1.0/dtex/sources/shiphero/windows.py +122 -0
  82. dtex-0.1.0/dtex/sources/stripe/README.md +128 -0
  83. dtex-0.1.0/dtex/sources/stripe/__init__.py +9 -0
  84. dtex-0.1.0/dtex/sources/stripe/client.py +336 -0
  85. dtex-0.1.0/dtex/sources/stripe/pagination.py +106 -0
  86. dtex-0.1.0/dtex/sources/stripe/register.yaml +206 -0
  87. dtex-0.1.0/dtex/sources/stripe/source.py +222 -0
  88. dtex-0.1.0/dtex/types.py +1861 -0
  89. dtex-0.1.0/pyproject.toml +128 -0
  90. dtex-0.1.0/tests/__init__.py +0 -0
  91. dtex-0.1.0/tests/conftest.py +172 -0
  92. dtex-0.1.0/tests/connectors/__init__.py +1 -0
  93. dtex-0.1.0/tests/connectors/test_filesystem.py +751 -0
  94. dtex-0.1.0/tests/connectors/test_postgres.py +822 -0
  95. dtex-0.1.0/tests/connectors/test_rest.py +909 -0
  96. dtex-0.1.0/tests/connectors/test_shiphero.py +876 -0
  97. dtex-0.1.0/tests/connectors/test_stripe.py +616 -0
  98. dtex-0.1.0/tests/destinations/__init__.py +7 -0
  99. dtex-0.1.0/tests/destinations/test_bigquery.py +1814 -0
  100. dtex-0.1.0/tests/fixtures/configs/echo.yml +22 -0
  101. dtex-0.1.0/tests/fixtures/destinations/lockedfake/destination.py +237 -0
  102. dtex-0.1.0/tests/fixtures/destinations/lockedfake/register.yaml +21 -0
  103. dtex-0.1.0/tests/fixtures/dtex_project.yml +24 -0
  104. dtex-0.1.0/tests/fixtures/profiles.yml +34 -0
  105. dtex-0.1.0/tests/fixtures/sources/echo/register.yaml +44 -0
  106. dtex-0.1.0/tests/fixtures/sources/echo/source.py +93 -0
  107. dtex-0.1.0/tests/test_cli.py +1281 -0
  108. dtex-0.1.0/tests/test_configs.py +580 -0
  109. dtex-0.1.0/tests/test_duckdb_destination.py +762 -0
  110. dtex-0.1.0/tests/test_engine.py +2206 -0
  111. dtex-0.1.0/tests/test_registry.py +621 -0
  112. dtex-0.1.0/tests/test_run_records.py +829 -0
  113. dtex-0.1.0/tests/test_secret_resolver_aws.py +582 -0
  114. dtex-0.1.0/tests/test_secret_resolver_gcp.py +529 -0
  115. dtex-0.1.0/tests/test_secret_resolver_vault.py +517 -0
  116. dtex-0.1.0/tests/test_secret_resolvers.py +551 -0
  117. dtex-0.1.0/tests/test_skeleton.py +8 -0
  118. dtex-0.1.0/tests/test_smoke.py +204 -0
  119. dtex-0.1.0/tests/test_types.py +953 -0
dtex-0.1.0/.gitignore ADDED
@@ -0,0 +1,20 @@
1
+ # Python
2
+ __pycache__/
3
+ *.pyc
4
+
5
+ # Virtual environments
6
+ .venv/
7
+
8
+ # Build artifacts
9
+ dist/
10
+ build/
11
+ *.egg-info/
12
+
13
+ # Test & type-check caches
14
+ .pytest_cache/
15
+ .mypy_cache/
16
+ .ruff_cache/
17
+
18
+ # dtex local state
19
+ .duckdb
20
+ .dtex/
@@ -0,0 +1,152 @@
1
+ # Contributing to dtex
2
+
3
+ Thanks for your interest in dtex. The governing principle is the
4
+ [design handbook](./docs/00-vision-and-naming.md): **keep it as simple as
5
+ possible.** This file covers dev setup, the PR process, and how to add a
6
+ new connector or secret-manager resolver.
7
+
8
+ By participating in this project you agree to abide by the
9
+ [Code of Conduct](./CODE_OF_CONDUCT.md).
10
+
11
+ ## Dev setup
12
+
13
+ dtex targets Python 3.11+. Clone the repo, then create a virtual environment
14
+ and install the package in editable mode with the `dev` extras:
15
+
16
+ ```sh
17
+ python -m venv .venv
18
+ source .venv/bin/activate
19
+ pip install -e ".[dev]"
20
+ ```
21
+
22
+ ## Run the tests
23
+
24
+ ```sh
25
+ pytest -q
26
+ ```
27
+
28
+ ## Run the linter and type checker
29
+
30
+ ```sh
31
+ ruff check .
32
+ mypy dtex
33
+ ```
34
+
35
+ Please make sure `pytest`, `ruff check`, and `mypy` all pass before opening a
36
+ pull request.
37
+
38
+ ## Spec precedence: code is the source of truth
39
+
40
+ The [design handbook](./docs/) (`docs/00`–`docs/12`) was written before the
41
+ implementation and remains the canonical *intent*. But once a contract is
42
+ implemented in code, **the code is the source of truth** — if the handbook and
43
+ the code diverge, fix the handbook to match the code, not the other way around.
44
+ This avoids re-litigating handbook ambiguities at every stage.
45
+
46
+ Worked examples already in the tree:
47
+
48
+ - `dtex/types.py::StateRecord` defines the canonical `_dtex_state` schema
49
+ (docs/03 §3.5 and docs/05 §5.1 follow it).
50
+ - **Configs are the runtime unit.** The CLI's `-p / --conf` arg and
51
+ `dtex.run(config=...)` library entry point both take a *config name* —
52
+ there is no source-alone selector. Documents `06`, `07`, and `12` follow
53
+ this.
54
+
55
+ ## PR process
56
+
57
+ 1. Branch off `main`.
58
+ 2. Make one logical change per PR — small PRs review faster and revert cleaner.
59
+ 3. Run the local checks before pushing:
60
+ ```sh
61
+ pytest -q && ruff check . && mypy dtex
62
+ ```
63
+ 4. Add or update tests for any new code path. Bug-fix PRs should land a
64
+ regression test alongside the fix.
65
+ 5. If you touch the public surface (a contract type, a CLI flag, a baked
66
+ connector's `register.yaml`, the secret-resolver protocol), update the
67
+ relevant chapter under `docs/` in the same PR.
68
+ 6. Add an entry under the `## [Unreleased]` section of
69
+ [`CHANGELOG.md`](./CHANGELOG.md). Group it under **Added** / **Changed** /
70
+ **Fixed** / **Removed** / **Deprecated** / **Security**.
71
+ 7. Write a descriptive commit message and link any related issue in the PR
72
+ description. Reviewers may request changes — that is the point of review,
73
+ not a verdict on your work.
74
+
75
+ ### Commit message style
76
+
77
+ Conventional-commit prefixes are **recommended but not enforced**:
78
+
79
+ - `feat:` — a user-visible new capability
80
+ - `fix:` — a bug fix
81
+ - `docs:` — documentation only
82
+ - `test:` — tests only
83
+ - `refactor:` — internal restructuring with no behavior change
84
+ - `chore:` — build, tooling, dependencies
85
+
86
+ Consistency helps readers skim the log; we will not bounce a PR for
87
+ deviating.
88
+
89
+ ## Adding a new source connector
90
+
91
+ A source connector is a folder under `dtex/sources/<name>/` (for a baked
92
+ one) or `connectors/sources/<name>/` (in a user project) containing:
93
+
94
+ 1. **`register.yaml`** — the manifest. Declares connector name, capabilities,
95
+ config keys (with `secret: true` for any sensitive field), and the streams
96
+ it exposes. See [docs/03 — The Connector Contract](./docs/03-connector-contract.md).
97
+ 2. **`source.py`** — the connector body. Generator functions decorated with
98
+ `@stream` or `@resource` that yield records. See
99
+ [docs/04 — Connector Body](./docs/04-connector-body.md).
100
+ 3. **Tests** under `tests/sources/<name>/` — at minimum, a smoke test that
101
+ exercises the happy path with a recorded fixture or a mocked HTTP layer.
102
+ Live-service tests should be gated by an env var and marked with the
103
+ `integration` pytest marker (see `pyproject.toml`).
104
+ 4. **`README.md`** in the connector folder — what it extracts, how to
105
+ authenticate, any operational notes.
106
+
107
+ The fastest scaffold is `dtex new source <name>` — it writes a skeletal
108
+ `register.yaml` plus a `source.py` you fill in.
109
+
110
+ ## Adding a new destination connector
111
+
112
+ Destinations follow the same folder + `register.yaml` + decorator shape, but
113
+ they accept records instead of yielding them. The folder lives under
114
+ `dtex/destinations/<name>/`, and the body uses `@destination`-hooked
115
+ functions. The destination contract — capabilities, the state-table shape,
116
+ the transactional-load expectation, schema evolution — is in
117
+ [docs/05 — Destinations and State](./docs/05-destinations-and-state.md).
118
+
119
+ Scaffold: `dtex new destination <name>`.
120
+
121
+ ## Adding a new secret-manager resolver
122
+
123
+ A secret-manager resolver is any object whose class declares
124
+ `scheme: ClassVar[str]` and implements `resolve(path, field) -> str`. It is
125
+ distributed either as a third-party package via the
126
+ `dtex.secret_resolvers` entry-point, or as a project-local
127
+ `dtex_plugins.py`. The protocol, registration mechanics, and the URL form
128
+ (`secret://<scheme>/<path>[#<field>]`) are in
129
+ [docs/08 §3 — Secret references and pluggable secret managers](./docs/08-security.md).
130
+
131
+ ## Releases
132
+
133
+ See [`docs/_internal/release.md`](./docs/_internal/release.md) for the
134
+ maintainer's release runbook.
135
+
136
+ ## Issue templates
137
+
138
+ Use the templates under
139
+ [`.github/ISSUE_TEMPLATE/`](./.github/ISSUE_TEMPLATE) to file a bug
140
+ report, feature request, or connector request. Security issues go through
141
+ the private channel described in [`SECURITY.md`](./SECURITY.md), **not**
142
+ the issue tracker.
143
+
144
+ ## License and contribution sign-off
145
+
146
+ By submitting a pull request you agree that your contribution is licensed
147
+ under the [Apache License 2.0](./LICENSE), the same license as the rest of
148
+ the project.
149
+
150
+ A Developer Certificate of Origin sign-off (`git commit -s`) is
151
+ **recommended** in v0.1 and will become **required** for v1.0. Adopting it
152
+ now is the lowest-friction way to ramp up.
dtex-0.1.0/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Albinas Plesnys
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
dtex-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,140 @@
1
+ Metadata-Version: 2.4
2
+ Name: dtex
3
+ Version: 0.1.0
4
+ Summary: dtex (data extraction tool) — an open-source Python EL tool: pipelines as configs, connectors as folders, CLI-first.
5
+ Project-URL: Homepage, https://github.com/vej-ai/dtex
6
+ Project-URL: Documentation, https://github.com/vej-ai/dtex/tree/main/docs
7
+ Project-URL: Source, https://github.com/vej-ai/dtex
8
+ Project-URL: Bug Tracker, https://github.com/vej-ai/dtex/issues
9
+ Project-URL: Changelog, https://github.com/vej-ai/dtex/blob/main/CHANGELOG.md
10
+ Author: Albinas Plesnys
11
+ License-Expression: Apache-2.0
12
+ License-File: LICENSE
13
+ Keywords: connectors,data-engineering,dbt,el,elt,extract-load
14
+ Classifier: Development Status :: 3 - Alpha
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: Apache Software License
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Database
22
+ Classifier: Typing :: Typed
23
+ Requires-Python: >=3.11
24
+ Requires-Dist: click
25
+ Requires-Dist: duckdb
26
+ Requires-Dist: google-cloud-bigquery>=3.20
27
+ Requires-Dist: google-cloud-storage>=2.10
28
+ Requires-Dist: psycopg[binary]>=3.1
29
+ Requires-Dist: pyarrow>=15
30
+ Requires-Dist: pyyaml
31
+ Requires-Dist: requests>=2.31
32
+ Provides-Extra: aws-secrets
33
+ Requires-Dist: boto3>=1.28; extra == 'aws-secrets'
34
+ Provides-Extra: dev
35
+ Requires-Dist: mypy; extra == 'dev'
36
+ Requires-Dist: pytest; extra == 'dev'
37
+ Requires-Dist: pytest-cov; extra == 'dev'
38
+ Requires-Dist: ruff; extra == 'dev'
39
+ Requires-Dist: types-pyyaml; extra == 'dev'
40
+ Requires-Dist: types-requests; extra == 'dev'
41
+ Provides-Extra: gcp-secrets
42
+ Requires-Dist: google-cloud-secret-manager>=2.20; extra == 'gcp-secrets'
43
+ Provides-Extra: gcs
44
+ Requires-Dist: google-cloud-storage>=2.10; extra == 'gcs'
45
+ Provides-Extra: s3
46
+ Requires-Dist: boto3>=1.28; extra == 's3'
47
+ Provides-Extra: vault
48
+ Requires-Dist: hvac>=2.0; extra == 'vault'
49
+ Description-Content-Type: text/markdown
50
+
51
+ # dtex
52
+
53
+ [![PyPI version](https://img.shields.io/pypi/v/dtex.svg)](https://pypi.org/project/dtex/)
54
+ [![Python versions](https://img.shields.io/pypi/pyversions/dtex.svg)](https://pypi.org/project/dtex/)
55
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
56
+ [![CI](https://github.com/vej-ai/dtex/actions/workflows/ci.yml/badge.svg)](https://github.com/vej-ai/dtex/actions/workflows/ci.yml)
57
+
58
+ **dtex** ("data extraction tool") is an open-source, self-hosted Python
59
+ **extract-load (EL)** tool. It moves data from a **source** (an API, a
60
+ database, a file drop) into a **destination** (a warehouse, a database, an
61
+ object store) — and nothing more. Transformation is dbt's job.
62
+
63
+ The pitch in one line: **a CLI-first, dbt-shaped extract-load tool —
64
+ pipelines are configs, connectors are folders, no UI blackbox.** The #1
65
+ principle is to keep it as simple as possible.
66
+
67
+ ## Install
68
+
69
+ ```sh
70
+ pip install dtex # every baked connector, ready
71
+ pip install 'dtex[gcs,s3]' # add gs:// / s3:// filesystem reads
72
+ pip install 'dtex[gcp-secrets]' # add the GCP Secret Manager resolver
73
+ pip install 'dtex[aws-secrets]' # add the AWS Secrets Manager resolver
74
+ pip install 'dtex[vault]' # add the HashiCorp Vault resolver
75
+ ```
76
+
77
+ `pip install dtex` ships every baked source and destination — DuckDB,
78
+ BigQuery, the filesystem source's local + Parquet path, the REST / Postgres
79
+ / ShipHero / Stripe sources, the engine, the CLI. Extras stay opt-in for the
80
+ cloud-storage paths of the filesystem source (`gs://` / `s3://`) and for
81
+ secret managers (only relevant if your `profiles.yml` uses `secret://` URLs).
82
+
83
+ dtex requires Python 3.11+. It installs both a CLI (`dtex`) and an importable
84
+ library (`import dtex`).
85
+
86
+ ## Usage
87
+
88
+ ```sh
89
+ dtex init my_project # scaffold a project
90
+ cd my_project
91
+ dtex new source my_api # scaffold a source connector
92
+ dtex new config my_pipeline # scaffold a pipeline config
93
+ dtex validate # check everything
94
+ dtex run -p my_pipeline # run the pipeline
95
+ dtex runs list -p my_pipeline # show recent run history
96
+ ```
97
+
98
+ A *pipeline* is one config file binding a source + a destination + a target +
99
+ params. Run it with `dtex run -p <config>`. The library equivalent is
100
+ `dtex.run(config="my_pipeline")` and returns a structured `RunResult`.
101
+
102
+ ## Pre-baked connectors
103
+
104
+ **Sources:** `filesystem` (CSV/JSONL/Parquet from local, GCS, or S3),
105
+ `rest` (paginated REST APIs — 4 pagination strategies, 4 auth modes),
106
+ `postgres` (keyset pagination, no `OFFSET`), `shiphero` (GraphQL),
107
+ `stripe` (resource-as-stream over the REST API).
108
+
109
+ **Destinations:** `duckdb` (zero-config dev default, all 5 capabilities) and
110
+ `bigquery` (production warehouse — Parquet-staged via GCS + LOAD jobs,
111
+ MERGE upserts, cursor-based partitioning).
112
+
113
+ **Engine:** per-stream commit + atomic transactions (rollback on failure),
114
+ state in the destination's `_dtex_state` table, run records in `_dtex_runs`,
115
+ structured JSON-lines logs per run, secret redaction, schema evolution
116
+ (`evolve` default, `strict` opt-in), pipeline-level parallelism with
117
+ per-destination caps.
118
+
119
+ **Secret managers:** GCP Secret Manager, AWS Secrets Manager, HashiCorp
120
+ Vault — each as an opt-in extra.
121
+
122
+ ## Documentation
123
+
124
+ The full design handbook lives in [`docs/`](./docs/README.md). Start with
125
+ [00 — Vision & Naming](./docs/00-vision-and-naming.md),
126
+ [02 — Architecture](./docs/02-architecture.md),
127
+ [06 — Project Anatomy](./docs/06-project-anatomy.md),
128
+ [12 — Configs](./docs/12-configs.md), and
129
+ [10 — Roadmap and Scope](./docs/10-roadmap-and-scope.md).
130
+
131
+ ## Security · Contributing · Code of Conduct
132
+
133
+ - [Security policy](./SECURITY.md) — how to report a vulnerability.
134
+ - [Contributing](./CONTRIBUTING.md) — dev setup, PR process, how to add a connector.
135
+ - [Code of Conduct](./CODE_OF_CONDUCT.md).
136
+ - [Changelog](./CHANGELOG.md).
137
+
138
+ ## License
139
+
140
+ Apache License 2.0 — see [LICENSE](./LICENSE).
dtex-0.1.0/README.md ADDED
@@ -0,0 +1,90 @@
1
+ # dtex
2
+
3
+ [![PyPI version](https://img.shields.io/pypi/v/dtex.svg)](https://pypi.org/project/dtex/)
4
+ [![Python versions](https://img.shields.io/pypi/pyversions/dtex.svg)](https://pypi.org/project/dtex/)
5
+ [![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
6
+ [![CI](https://github.com/vej-ai/dtex/actions/workflows/ci.yml/badge.svg)](https://github.com/vej-ai/dtex/actions/workflows/ci.yml)
7
+
8
+ **dtex** ("data extraction tool") is an open-source, self-hosted Python
9
+ **extract-load (EL)** tool. It moves data from a **source** (an API, a
10
+ database, a file drop) into a **destination** (a warehouse, a database, an
11
+ object store) — and nothing more. Transformation is dbt's job.
12
+
13
+ The pitch in one line: **a CLI-first, dbt-shaped extract-load tool —
14
+ pipelines are configs, connectors are folders, no UI blackbox.** The #1
15
+ principle is to keep it as simple as possible.
16
+
17
+ ## Install
18
+
19
+ ```sh
20
+ pip install dtex # every baked connector, ready
21
+ pip install 'dtex[gcs,s3]' # add gs:// / s3:// filesystem reads
22
+ pip install 'dtex[gcp-secrets]' # add the GCP Secret Manager resolver
23
+ pip install 'dtex[aws-secrets]' # add the AWS Secrets Manager resolver
24
+ pip install 'dtex[vault]' # add the HashiCorp Vault resolver
25
+ ```
26
+
27
+ `pip install dtex` ships every baked source and destination — DuckDB,
28
+ BigQuery, the filesystem source's local + Parquet path, the REST / Postgres
29
+ / ShipHero / Stripe sources, the engine, the CLI. Extras stay opt-in for the
30
+ cloud-storage paths of the filesystem source (`gs://` / `s3://`) and for
31
+ secret managers (only relevant if your `profiles.yml` uses `secret://` URLs).
32
+
33
+ dtex requires Python 3.11+. It installs both a CLI (`dtex`) and an importable
34
+ library (`import dtex`).
35
+
36
+ ## Usage
37
+
38
+ ```sh
39
+ dtex init my_project # scaffold a project
40
+ cd my_project
41
+ dtex new source my_api # scaffold a source connector
42
+ dtex new config my_pipeline # scaffold a pipeline config
43
+ dtex validate # check everything
44
+ dtex run -p my_pipeline # run the pipeline
45
+ dtex runs list -p my_pipeline # show recent run history
46
+ ```
47
+
48
+ A *pipeline* is one config file binding a source + a destination + a target +
49
+ params. Run it with `dtex run -p <config>`. The library equivalent is
50
+ `dtex.run(config="my_pipeline")` and returns a structured `RunResult`.
51
+
52
+ ## Pre-baked connectors
53
+
54
+ **Sources:** `filesystem` (CSV/JSONL/Parquet from local, GCS, or S3),
55
+ `rest` (paginated REST APIs — 4 pagination strategies, 4 auth modes),
56
+ `postgres` (keyset pagination, no `OFFSET`), `shiphero` (GraphQL),
57
+ `stripe` (resource-as-stream over the REST API).
58
+
59
+ **Destinations:** `duckdb` (zero-config dev default, all 5 capabilities) and
60
+ `bigquery` (production warehouse — Parquet-staged via GCS + LOAD jobs,
61
+ MERGE upserts, cursor-based partitioning).
62
+
63
+ **Engine:** per-stream commit + atomic transactions (rollback on failure),
64
+ state in the destination's `_dtex_state` table, run records in `_dtex_runs`,
65
+ structured JSON-lines logs per run, secret redaction, schema evolution
66
+ (`evolve` default, `strict` opt-in), pipeline-level parallelism with
67
+ per-destination caps.
68
+
69
+ **Secret managers:** GCP Secret Manager, AWS Secrets Manager, HashiCorp
70
+ Vault — each as an opt-in extra.
71
+
72
+ ## Documentation
73
+
74
+ The full design handbook lives in [`docs/`](./docs/README.md). Start with
75
+ [00 — Vision & Naming](./docs/00-vision-and-naming.md),
76
+ [02 — Architecture](./docs/02-architecture.md),
77
+ [06 — Project Anatomy](./docs/06-project-anatomy.md),
78
+ [12 — Configs](./docs/12-configs.md), and
79
+ [10 — Roadmap and Scope](./docs/10-roadmap-and-scope.md).
80
+
81
+ ## Security · Contributing · Code of Conduct
82
+
83
+ - [Security policy](./SECURITY.md) — how to report a vulnerability.
84
+ - [Contributing](./CONTRIBUTING.md) — dev setup, PR process, how to add a connector.
85
+ - [Code of Conduct](./CODE_OF_CONDUCT.md).
86
+ - [Changelog](./CHANGELOG.md).
87
+
88
+ ## License
89
+
90
+ Apache License 2.0 — see [LICENSE](./LICENSE).