etlplus 0.13.0__py3-none-any.whl → 0.14.1__py3-none-any.whl
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.
- etlplus/README.md +1 -1
- etlplus/__init__.py +1 -26
- etlplus/api/__init__.py +8 -0
- etlplus/api/endpoint_client.py +3 -3
- etlplus/{run_helpers.py → api/utils.py} +121 -79
- etlplus/cli/handlers.py +17 -7
- etlplus/{validation → ops}/README.md +2 -2
- etlplus/ops/__init__.py +61 -0
- etlplus/{extract.py → ops/extract.py} +78 -94
- etlplus/{load.py → ops/load.py} +73 -93
- etlplus/{run.py → ops/run.py} +140 -110
- etlplus/{transform.py → ops/transform.py} +75 -68
- etlplus/{validation → ops}/utils.py +62 -15
- etlplus/{validate.py → ops/validate.py} +19 -9
- etlplus/types.py +2 -2
- {etlplus-0.13.0.dist-info → etlplus-0.14.1.dist-info}/METADATA +4 -4
- {etlplus-0.13.0.dist-info → etlplus-0.14.1.dist-info}/RECORD +21 -21
- etlplus/validation/__init__.py +0 -44
- {etlplus-0.13.0.dist-info → etlplus-0.14.1.dist-info}/WHEEL +0 -0
- {etlplus-0.13.0.dist-info → etlplus-0.14.1.dist-info}/entry_points.txt +0 -0
- {etlplus-0.13.0.dist-info → etlplus-0.14.1.dist-info}/licenses/LICENSE +0 -0
- {etlplus-0.13.0.dist-info → etlplus-0.14.1.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: etlplus
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.14.1
|
|
4
4
|
Summary: A Swiss Army knife for simple ETL operations
|
|
5
5
|
Home-page: https://github.com/Dagitali/ETLPlus
|
|
6
6
|
Author: ETLPlus Team
|
|
@@ -196,7 +196,7 @@ etlplus extract file examples/data/sample.csv \
|
|
|
196
196
|
[Python API](#python-api):
|
|
197
197
|
|
|
198
198
|
```python
|
|
199
|
-
from etlplus import extract, transform, validate, load
|
|
199
|
+
from etlplus.ops import extract, transform, validate, load
|
|
200
200
|
|
|
201
201
|
data = extract("file", "input.csv")
|
|
202
202
|
ops = {"filter": {"field": "age", "op": "gt", "value": 25}, "select": ["name", "email"]}
|
|
@@ -531,7 +531,7 @@ cat examples/data/sample.json \
|
|
|
531
531
|
Use ETLPlus as a Python library:
|
|
532
532
|
|
|
533
533
|
```python
|
|
534
|
-
from etlplus import extract, validate, transform, load
|
|
534
|
+
from etlplus.ops import extract, validate, transform, load
|
|
535
535
|
|
|
536
536
|
# Extract data
|
|
537
537
|
data = extract("file", "data.json")
|
|
@@ -726,7 +726,7 @@ We split tests into two layers:
|
|
|
726
726
|
pagination + rate limit defaults, file/API connector interactions) may touch temp files and use
|
|
727
727
|
fake clients.
|
|
728
728
|
|
|
729
|
-
If a test calls `etlplus.cli.main()` or `etlplus.run.run()` it’s integration by default.
|
|
729
|
+
If a test calls `etlplus.cli.main()` or `etlplus.ops.run.run()` it’s integration by default. Full
|
|
730
730
|
criteria: [`CONTRIBUTING.md#testing`](CONTRIBUTING.md#testing).
|
|
731
731
|
|
|
732
732
|
### Code Coverage
|
|
@@ -1,29 +1,24 @@
|
|
|
1
|
-
etlplus/README.md,sha256=
|
|
2
|
-
etlplus/__init__.py,sha256=
|
|
1
|
+
etlplus/README.md,sha256=HwDt6eh6p4422FOJhrpUBhfPGC82QzpsJNecs3zEtUU,1459
|
|
2
|
+
etlplus/__init__.py,sha256=mgTP4PJmRmsEjTCAizzzdtzAmhuHtarmPzphzdjvLgM,277
|
|
3
3
|
etlplus/__main__.py,sha256=btoROneNiigyfBU7BSzPKZ1R9gzBMpxcpsbPwmuHwTM,479
|
|
4
4
|
etlplus/__version__.py,sha256=1E0GMK_yUWCMQFKxXjTvyMwofi0qT2k4CDNiHWiymWE,327
|
|
5
5
|
etlplus/dag.py,sha256=4EYmBsJax3y4clHv10jjdp3GrBBD_WblvtxUb_JxGCQ,2464
|
|
6
6
|
etlplus/enums.py,sha256=WyxpUEUPdYdXlueKDXGaSEo7o9OqCXyzjDOOPqmW8tw,8326
|
|
7
|
-
etlplus/extract.py,sha256=LOyL8_KCOaIGemTxSnKbN_ttfLWUljqT4OQxANe7G3k,6089
|
|
8
|
-
etlplus/load.py,sha256=aufl-2CpuI_J1hKBY1uFsoVf9Gfl9bKQjs233dYFf00,8631
|
|
9
7
|
etlplus/mixins.py,sha256=ifGpHwWv7U00yqGf-kN93vJax2IiK4jaGtTsPsO3Oak,1350
|
|
10
8
|
etlplus/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
|
-
etlplus/
|
|
12
|
-
etlplus/run_helpers.py,sha256=bj6MkaeFxjl3CeKG1HoXKx5DwAlXNERVW-GX-z1P_qQ,24373
|
|
13
|
-
etlplus/transform.py,sha256=uAUVDDHYCgx7GpVez9IK3OAZM-CnCuMa9iox3vwGGJA,25296
|
|
14
|
-
etlplus/types.py,sha256=1hsDlnF6r76zAwaUYay-i6pCM-Y0IU5nP7Crj8PLCQ4,6157
|
|
9
|
+
etlplus/types.py,sha256=LhyKU67CW7CcLEshE_1OIvEqWr-QVMJVYByf1221miY,6161
|
|
15
10
|
etlplus/utils.py,sha256=BMLTWAvCJj3zLEcffBgURYnu0UGhhXsfH2WWpAt7fV8,13363
|
|
16
|
-
etlplus/validate.py,sha256=7rJoEI_SIILdPpoBqqh2UJqg9oeReDz34mYSlc3t7Qg,12989
|
|
17
11
|
etlplus/api/README.md,sha256=aGTbcL-EqaiMTS7GToibmeTIzjX-viP2OtUDfIJnZEo,7913
|
|
18
|
-
etlplus/api/__init__.py,sha256=
|
|
12
|
+
etlplus/api/__init__.py,sha256=bWa5a9PjYLVnyd9yh3SCgS-4-WOFSKXsH27zeYMTnJc,4567
|
|
19
13
|
etlplus/api/auth.py,sha256=GOO5on-LoMS1GXTAhtK9rFcfpjbBcNeA6NE5UZwIq0g,12158
|
|
20
14
|
etlplus/api/config.py,sha256=wRpOaZ31sPReVzEMme0jKl_37nqgraESwuYSNxP_xDo,17397
|
|
21
|
-
etlplus/api/endpoint_client.py,sha256=
|
|
15
|
+
etlplus/api/endpoint_client.py,sha256=OPAvw3NkpSzeITqgRP1reyqX9Nc_XC8lAj6Yp7nV4Tw,30705
|
|
22
16
|
etlplus/api/errors.py,sha256=XjI2xW-sypMUNUbqfc2S57-IGyWnH3oCDFhCmKYYI_Q,4648
|
|
23
17
|
etlplus/api/request_manager.py,sha256=YkDz803HM3BBzamsEZdSdE9fbVT0avMbTaLAgar9Wzo,18481
|
|
24
18
|
etlplus/api/retry_manager.py,sha256=0GDhJVyIlb1Ww35JUWlYoa8QYUPjKLBtxQeZj3TdLbY,11306
|
|
25
19
|
etlplus/api/transport.py,sha256=LRsQEPxIYrvXQQMvgPPkIl_57YCmanzsWNEnSYdP_d8,9164
|
|
26
20
|
etlplus/api/types.py,sha256=687JigIf3qfYxgGTNBaMNsQsrza5Pja6DcK5llM9oRU,4591
|
|
21
|
+
etlplus/api/utils.py,sha256=hUrVALJkq4sRQD-UIYyBUgWOmK5cgrs6P_BqXDtErPw,25874
|
|
27
22
|
etlplus/api/pagination/__init__.py,sha256=a4UX2J0AG8RMvmHt_CCofUm5vSmFo6GAfkb8XnSXypM,1395
|
|
28
23
|
etlplus/api/pagination/client.py,sha256=42cG442od3mQkw_JsvGvxT_w7y9J4HPM5PB4tFFU6EQ,5383
|
|
29
24
|
etlplus/api/pagination/config.py,sha256=3dXDJ-nMbO9Zk6i344n4roBFbUlHsa294D1_plPmm6E,13579
|
|
@@ -35,7 +30,7 @@ etlplus/cli/README.md,sha256=rl9VYNH5MluV0rh-eP7TbxJZ5BTMEIaksxhl_JXpYio,1233
|
|
|
35
30
|
etlplus/cli/__init__.py,sha256=J97-Rv931IL1_b4AXnB7Fbbd7HKnHBpx18NQfC_kE6c,299
|
|
36
31
|
etlplus/cli/commands.py,sha256=g8_m3A8HEMyTRu2HctNiRoi2gtB5oSZCUEcyq-PIXos,24669
|
|
37
32
|
etlplus/cli/constants.py,sha256=E6Uy4WauLa_0zkzxqImXh-bb1gKdb9sBZQVc8QOzr2Q,1943
|
|
38
|
-
etlplus/cli/handlers.py,sha256=
|
|
33
|
+
etlplus/cli/handlers.py,sha256=gbW1jH348QmX65g4gffxrtMt2obFIw8X0dEKnwXQKPQ,18170
|
|
39
34
|
etlplus/cli/io.py,sha256=EFaBPYaBOyOllfMQWXgTjy-MPiGfNejicpD7ROrPyAE,7840
|
|
40
35
|
etlplus/cli/main.py,sha256=IgeqxypixfwLHR-QcpgVMQ7vMZ865bXOh2oO9v-BWeM,5234
|
|
41
36
|
etlplus/cli/options.py,sha256=vfXT3YLh7wG1iC-aTdSg6ItMC8l6n0Lozmy53XjqLbA,1199
|
|
@@ -119,16 +114,21 @@ etlplus/file/xpt.py,sha256=JLqOkZ60awNsPXSqLKcPUwqZLPhPR05zk4EVRdEfvoU,1702
|
|
|
119
114
|
etlplus/file/yaml.py,sha256=8BEqCELaTQ_nRu1iksLBHVj19P6JmcUf5__fe0yVigw,2449
|
|
120
115
|
etlplus/file/zip.py,sha256=nd26V3S0edklriKnKOGDTLlO8RBXTda_zLLEQrJgKL4,4185
|
|
121
116
|
etlplus/file/zsav.py,sha256=2WxjXamvzj0adDbWGMWM3-cj_LsCRjyZz4J907lNkPk,1664
|
|
117
|
+
etlplus/ops/README.md,sha256=8omi7DYZhelc26JKk8Cm8QR8I3OGwziysPj1ivx41iQ,1380
|
|
118
|
+
etlplus/ops/__init__.py,sha256=NIIr2f-AZj5B0piBt6gjv46Yn0SzGYxEe6BPoopRh38,1702
|
|
119
|
+
etlplus/ops/extract.py,sha256=s3CaLXMY_loMoPU47rvvzyp1buk84uCzDqqaI7l3Dwg,5785
|
|
120
|
+
etlplus/ops/load.py,sha256=2jMewdjaNS1GKZ9cn94ISRSzDfqO3_s5fb_YNo_CqIc,8330
|
|
121
|
+
etlplus/ops/run.py,sha256=nivgj3cY5QniNc-u4n71gr2p4wXXvt5fYQUHiOEfKUA,13395
|
|
122
|
+
etlplus/ops/transform.py,sha256=1P43WYUaw872JDU86FhbbbkP8xnBWpgEPn2Q-z4ywls,25421
|
|
123
|
+
etlplus/ops/utils.py,sha256=9cN-bmcYs87R84GllmW7fSiUEmXFqIkGbSFiPYStsbA,11198
|
|
124
|
+
etlplus/ops/validate.py,sha256=gLa5zcwhxGbaIhH-OqTwDsQAgAYZSajLVGwwyeT2OZk,13257
|
|
122
125
|
etlplus/templates/README.md,sha256=kHSZ8FWcrlrcWz0hBIbho-k1Bi-PL-DQ7g02o-g70c8,1355
|
|
123
126
|
etlplus/templates/__init__.py,sha256=tsniN7XJYs3NwYxJ6c2HD5upHP3CDkLx-bQCMt97UOM,106
|
|
124
127
|
etlplus/templates/ddl.sql.j2,sha256=s8fMWvcb4eaJVXkifuib1aQPljtZ8buuyB_uA-ZdU3Q,4734
|
|
125
128
|
etlplus/templates/view.sql.j2,sha256=Iy8DHfhq5yyvrUKDxqp_aHIEXY4Tm6j4wT7YDEFWAhk,2180
|
|
126
|
-
etlplus/
|
|
127
|
-
etlplus/
|
|
128
|
-
etlplus/
|
|
129
|
-
etlplus-0.
|
|
130
|
-
etlplus-0.
|
|
131
|
-
etlplus-0.
|
|
132
|
-
etlplus-0.13.0.dist-info/entry_points.txt,sha256=6w-2-jzuPa55spzK34h-UKh2JTEShh38adFRONNP9QE,45
|
|
133
|
-
etlplus-0.13.0.dist-info/top_level.txt,sha256=aWWF-udn_sLGuHTM6W6MLh99ArS9ROkUWO8Mi8y1_2U,8
|
|
134
|
-
etlplus-0.13.0.dist-info/RECORD,,
|
|
129
|
+
etlplus-0.14.1.dist-info/licenses/LICENSE,sha256=MuNO63i6kWmgnV2pbP2SLqP54mk1BGmu7CmbtxMmT-U,1069
|
|
130
|
+
etlplus-0.14.1.dist-info/METADATA,sha256=hr3LS7VVswkiW_PnXQcHZFEElSZFrrgVxi5BhkKz5h8,28115
|
|
131
|
+
etlplus-0.14.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
132
|
+
etlplus-0.14.1.dist-info/entry_points.txt,sha256=6w-2-jzuPa55spzK34h-UKh2JTEShh38adFRONNP9QE,45
|
|
133
|
+
etlplus-0.14.1.dist-info/top_level.txt,sha256=aWWF-udn_sLGuHTM6W6MLh99ArS9ROkUWO8Mi8y1_2U,8
|
|
134
|
+
etlplus-0.14.1.dist-info/RECORD,,
|
etlplus/validation/__init__.py
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"""
|
|
2
|
-
:mod:`etlplus.validation` package.
|
|
3
|
-
|
|
4
|
-
Conditional validation utilities used across the ETL pipeline.
|
|
5
|
-
|
|
6
|
-
The package intentionally exposes a single helper, :func:`maybe_validate`, to
|
|
7
|
-
keep the public API compact and predictable. Supporting logic lives in
|
|
8
|
-
``etlplus.validation.utils`` where validation configuration is normalized,
|
|
9
|
-
reducing the likelihood of phase/option mismatches.
|
|
10
|
-
|
|
11
|
-
Examples
|
|
12
|
-
--------
|
|
13
|
-
>>> from etlplus.validation import maybe_validate
|
|
14
|
-
>>> payload = {'name': 'Alice'}
|
|
15
|
-
>>> rules = {'required': ['name']}
|
|
16
|
-
>>> def validator(data, config):
|
|
17
|
-
... missing = [field for field in config['required'] if field not in data]
|
|
18
|
-
... return {'valid': not missing, 'errors': missing, 'data': data}
|
|
19
|
-
>>> maybe_validate(
|
|
20
|
-
... payload,
|
|
21
|
-
... when='both',
|
|
22
|
-
... enabled=True,
|
|
23
|
-
... rules=rules,
|
|
24
|
-
... phase='before_transform',
|
|
25
|
-
... severity='warn',
|
|
26
|
-
... validate_fn=validator,
|
|
27
|
-
... print_json_fn=lambda message: message,
|
|
28
|
-
... )
|
|
29
|
-
{'name': 'Alice'}
|
|
30
|
-
|
|
31
|
-
See Also
|
|
32
|
-
--------
|
|
33
|
-
- :mod:`etlplus.validation.utils` for implementation details and helper
|
|
34
|
-
utilities.
|
|
35
|
-
"""
|
|
36
|
-
|
|
37
|
-
from __future__ import annotations
|
|
38
|
-
|
|
39
|
-
from .utils import maybe_validate
|
|
40
|
-
|
|
41
|
-
# SECTION: EXPORTS ========================================================== #
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
__all__ = ['maybe_validate']
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|