etlplus 0.12.10__py3-none-any.whl → 0.12.12__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/file/xlsm.py ADDED
@@ -0,0 +1,79 @@
1
+ """
2
+ :mod:`etlplus.file.xlsm` module.
3
+
4
+ Helpers for reading/writing Microsoft Excel Macro-Enabled (XLSM) spreadsheet
5
+ files.
6
+
7
+ Notes
8
+ -----
9
+ - An XLSM file is a spreadsheet file created using the Microsoft Excel Macro-
10
+ Enabled (Open XML) format.
11
+ - Common cases:
12
+ - Reading data from Excel Macro-Enabled spreadsheets.
13
+ - Writing data to Excel Macro-Enabled format for compatibility.
14
+ - Converting XLSM files to more modern formats.
15
+ - Rule of thumb:
16
+ - If you need to work with Excel Macro-Enabled spreadsheet files, use this
17
+ module for reading and writing.
18
+ """
19
+
20
+ from __future__ import annotations
21
+
22
+ from pathlib import Path
23
+
24
+ from ..types import JSONData
25
+ from ..types import JSONList
26
+ from . import stub
27
+
28
+ # SECTION: EXPORTS ========================================================== #
29
+
30
+
31
+ __all__ = [
32
+ 'read',
33
+ 'write',
34
+ ]
35
+
36
+
37
+ # SECTION: FUNCTIONS ======================================================== #
38
+
39
+
40
+ def read(
41
+ path: Path,
42
+ ) -> JSONList:
43
+ """
44
+ Read XLSM content from ``path``.
45
+
46
+ Parameters
47
+ ----------
48
+ path : Path
49
+ Path to the XLSM file on disk.
50
+
51
+ Returns
52
+ -------
53
+ JSONList
54
+ The list of dictionaries read from the XLSM file.
55
+ """
56
+ return stub.read(path, format_name='XLSM')
57
+
58
+
59
+ def write(
60
+ path: Path,
61
+ data: JSONData,
62
+ ) -> int:
63
+ """
64
+ Write ``data`` to XLSM file at ``path`` and return record count.
65
+
66
+ Parameters
67
+ ----------
68
+ path : Path
69
+ Path to the XLSM file on disk.
70
+ data : JSONData
71
+ Data to write as XLSM file. Should be a list of dictionaries or a
72
+ single dictionary.
73
+
74
+ Returns
75
+ -------
76
+ int
77
+ The number of rows written to the XLSM file.
78
+ """
79
+ return stub.write(path, data, format_name='XLSM')
etlplus/file/xpt.py ADDED
@@ -0,0 +1,78 @@
1
+ """
2
+ :mod:`etlplus.file.xpt` module.
3
+
4
+ Helpers for reading/writing SAS Transport (XPT) files.
5
+
6
+ Notes
7
+ -----
8
+ - A SAS Transport (XPT) file is a standardized file format used to transfer
9
+ SAS datasets between different systems.
10
+ - Common cases:
11
+ - Sharing datasets between different SAS installations.
12
+ - Archiving datasets in a platform-independent format.
13
+ - Importing/exporting data to/from statistical software that supports XPT.
14
+ - Rule of thumb:
15
+ - If you need to work with XPT files, use this module for reading
16
+ and writing.
17
+ """
18
+
19
+ from __future__ import annotations
20
+
21
+ from pathlib import Path
22
+
23
+ from ..types import JSONData
24
+ from ..types import JSONList
25
+ from . import stub
26
+
27
+ # SECTION: EXPORTS ========================================================== #
28
+
29
+
30
+ __all__ = [
31
+ 'read',
32
+ 'write',
33
+ ]
34
+
35
+
36
+ # SECTION: FUNCTIONS ======================================================== #
37
+
38
+
39
+ def read(
40
+ path: Path,
41
+ ) -> JSONList:
42
+ """
43
+ Read XPT content from ``path``.
44
+
45
+ Parameters
46
+ ----------
47
+ path : Path
48
+ Path to the XPT file on disk.
49
+
50
+ Returns
51
+ -------
52
+ JSONList
53
+ The list of dictionaries read from the XPT file.
54
+ """
55
+ return stub.read(path, format_name='XPT')
56
+
57
+
58
+ def write(
59
+ path: Path,
60
+ data: JSONData,
61
+ ) -> int:
62
+ """
63
+ Write ``data`` to XPT file at ``path`` and return record count.
64
+
65
+ Parameters
66
+ ----------
67
+ path : Path
68
+ Path to the XPT file on disk.
69
+ data : JSONData
70
+ Data to write as XPT file. Should be a list of dictionaries or a
71
+ single dictionary.
72
+
73
+ Returns
74
+ -------
75
+ int
76
+ The number of rows written to the XPT file.
77
+ """
78
+ return stub.write(path, data, format_name='XPT')
etlplus/file/zsav.py ADDED
@@ -0,0 +1,77 @@
1
+ """
2
+ :mod:`etlplus.file.zsav` module.
3
+
4
+ Helpers for reading/writing compressed SPSS (ZSAV) data files.
5
+
6
+ Notes
7
+ -----
8
+ - A ZSAV file is a compressed binary file format used by SPSS to store
9
+ datasets, including variables, labels, and data types.
10
+ - Common cases:
11
+ - Reading compressed data for analysis in Python.
12
+ - Writing processed data back to compressed SPSS format.
13
+ - Rule of thumb:
14
+ - If you need to work with compressed SPSS data files, use this module for
15
+ reading and writing.
16
+ """
17
+
18
+ from __future__ import annotations
19
+
20
+ from pathlib import Path
21
+
22
+ from ..types import JSONData
23
+ from ..types import JSONList
24
+ from . import stub
25
+
26
+ # SECTION: EXPORTS ========================================================== #
27
+
28
+
29
+ __all__ = [
30
+ 'read',
31
+ 'write',
32
+ ]
33
+
34
+
35
+ # SECTION: FUNCTIONS ======================================================== #
36
+
37
+
38
+ def read(
39
+ path: Path,
40
+ ) -> JSONList:
41
+ """
42
+ Read ZSAV content from ``path``.
43
+
44
+ Parameters
45
+ ----------
46
+ path : Path
47
+ Path to the ZSAV file on disk.
48
+
49
+ Returns
50
+ -------
51
+ JSONList
52
+ The list of dictionaries read from the ZSAV file.
53
+ """
54
+ return stub.read(path, format_name='ZSAV')
55
+
56
+
57
+ def write(
58
+ path: Path,
59
+ data: JSONData,
60
+ ) -> int:
61
+ """
62
+ Write ``data`` to ZSAV file at ``path`` and return record count.
63
+
64
+ Parameters
65
+ ----------
66
+ path : Path
67
+ Path to the ZSAV file on disk.
68
+ data : JSONData
69
+ Data to write as ZSAV file. Should be a list of dictionaries or a
70
+ single dictionary.
71
+
72
+ Returns
73
+ -------
74
+ int
75
+ The number of rows written to the ZSAV file.
76
+ """
77
+ return stub.write(path, data, format_name='ZSAV')
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: etlplus
3
- Version: 0.12.10
3
+ Version: 0.12.12
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
@@ -64,41 +64,60 @@ etlplus/file/arrow.py,sha256=rYPqoCAI3cBHETYN3c0Xi7R5Nq7_prIdyESm3ll3Zos,1694
64
64
  etlplus/file/avro.py,sha256=yFQMnWPcvC0CbDCyagoB9SHRIuvl2SXIoQJTBIlw4dA,4437
65
65
  etlplus/file/bson.py,sha256=okCWQveCnaRxJ47Oy7-HpByEkiwmiSLSWc0a9eISuVg,1613
66
66
  etlplus/file/cbor.py,sha256=hpXTqQ-ei4jYKt6-zq3frDXy-SWRpx1ThQUce6b01xU,1667
67
- etlplus/file/cfg.py,sha256=sUgbQndKM8vNB7uKRNCaKmJ7Z1KcAVclOnhFP6rqAB8,1726
68
- etlplus/file/conf.py,sha256=30OsMACauw2gzAo4LN6I0LY0mfnB9OR92GLTOcaH4Mc,1784
67
+ etlplus/file/cfg.py,sha256=cT2RKFgEMsAJaT9_EIPvYCzS4F9HdRJhEZTDMCVMZ4s,1710
68
+ etlplus/file/conf.py,sha256=TKkiuGf_r4pNlxKEgxn8d1Pza-4oeWZiYjvlpMk-un4,1768
69
69
  etlplus/file/core.py,sha256=71AFsVwvAP6crsAphMkAmhqTwk_-TkEw9eByG6gwzpA,8862
70
70
  etlplus/file/csv.py,sha256=6zXt7OKXm_6k8MrDyw8DdEwpQQrmrxG6myrDplF87_E,1744
71
71
  etlplus/file/dat.py,sha256=j-GpY49SmkZtDUzZK6CbrHY9k6N83pyGcMqVGgJZ9cs,1642
72
+ etlplus/file/dta.py,sha256=cEprcahuYEncDYEBZiEoHyg-1jgBsr9eCHPLdI-naXM,1616
72
73
  etlplus/file/duckdb.py,sha256=hQ8PWcvYILpkgPEtWeqbT_0yhQpJN9bJh1OwQQCcRD4,1631
73
- etlplus/file/enums.py,sha256=l7rnwOSf4G27He1y_6Gia3LHLKhnsewlJl7tSlPD_Pw,10924
74
+ etlplus/file/enums.py,sha256=O40_cHazyvLFTK1hSErK0a8EMYQy4TJPX4El7cXO3pc,11083
74
75
  etlplus/file/feather.py,sha256=U19T5V_08ooK1STclE9nDvsnUFzu7nvQvi6J09iC-_0,2669
75
76
  etlplus/file/fwf.py,sha256=WLbvL94cyLCOYfhABJvoIQc1fljtz3yOuA7X4Fc4QGo,1589
76
77
  etlplus/file/gz.py,sha256=NKsvIV7TIWn8USbvuZmRH9hr6OrXh4TzTfDykHD41Kk,2631
78
+ etlplus/file/hbs.py,sha256=iz0tIVNmsCYjTLnE5x-m3Smh5QKbfuQA-sgOHOZ_T3g,1614
79
+ etlplus/file/hdf5.py,sha256=SZ-UbXTJGOYA82hdma7AFulWo9emH5Kih_RXC7f-Bfk,1624
77
80
  etlplus/file/ini.py,sha256=HlvQyQC00oBD8KFBfznPjBx9wF1ZwXH7Yo1JaXqCq8I,1701
78
81
  etlplus/file/ion.py,sha256=9q938jROTAcuUT5sRYvS1qIeoz9p8KkVWYDDS2-2A_4,1710
82
+ etlplus/file/jinja2.py,sha256=FFqGQjBnRgPQ-oJ3WqiKspJMj6g_J0fDKGwsoOJAEzk,1630
79
83
  etlplus/file/json.py,sha256=6EWsOI4RZo366FYsnPp-VkHdgAVBRVUwix-hAJZQM10,2537
80
84
  etlplus/file/log.py,sha256=OmsGijXZn1VhN7BUklF8saoktxkmHh1MPLI_BbGDLyc,1681
85
+ etlplus/file/mat.py,sha256=u3jWMK8c4k9L0uVRiQSd7JgVQF-efoJj3QiKYtt1arA,1654
81
86
  etlplus/file/mdb.py,sha256=hSCaxBbc_b9dGTBpR-Gb0UTY2r3zYUxoEiKuwpnx0kI,1657
82
87
  etlplus/file/msgpack.py,sha256=9PTitVGnZM0yB2iiwsgLokai6DRmp2l2zfhyjEcajg8,1658
88
+ etlplus/file/mustache.py,sha256=F-xVUH69evPQkunUx746B4rnOHxgAUP6KVpexK3zI_Q,1647
89
+ etlplus/file/nc.py,sha256=3RFCl7OvCFAiwyVJJHF5_oa3UdGtDGsVU69OTMpiOdk,1670
83
90
  etlplus/file/ndjson.py,sha256=fSMAAdyucGIVl6zVqylWSBosOg899wgIpIWCGm2HOWU,2432
91
+ etlplus/file/numbers.py,sha256=RSRC6sFYyWxmeTHWM7-D14MQQlDaz-FVehbSyG9u9Ds,1610
92
+ etlplus/file/ods.py,sha256=6XsWkcrBsvQxzMdeMulqwExl3BjRe8gR-kNu0-hiRPE,1800
84
93
  etlplus/file/orc.py,sha256=fOO2jQwUr5FHbDve7ztmrE1Mb8uBMQtDo0yp-elVn8Q,2602
85
94
  etlplus/file/parquet.py,sha256=nzMrUNQux7Of8Nn0c4d2WYuIJQwZY_xQiO_AuVMCzrI,2758
86
95
  etlplus/file/pb.py,sha256=sg72vrjbp7azgEK_oRigmNdSqtEnsrBF24VjOohZhow,1615
87
96
  etlplus/file/pbf.py,sha256=lcdehGK_g2drs0VFqTAxZO9-sv65SAkW894ttmlBG8I,1620
88
- etlplus/file/properties.py,sha256=ZvQ6xiSC71bPH8e5VUt-oITSI1xF99zymoMUgwVur3c,1674
97
+ etlplus/file/properties.py,sha256=zsdaIWbSGGXH1bvlI8XPtc0eQCb-CeeA5CHJaqupNrE,1718
89
98
  etlplus/file/proto.py,sha256=QnZMGYHmr6jyiQ08W7hx_MHzNDrPEmMmnbttNRlY4Pg,1668
90
99
  etlplus/file/psv.py,sha256=-pfGvLSNOMWVl1mGoKJ_Rh5p5wDyCaxLEd09U23Iub0,1726
100
+ etlplus/file/rda.py,sha256=oFbnf6SQrbgKdNDvQ94aeubwVlSEY0K_2BMIEqp22pY,1668
101
+ etlplus/file/rds.py,sha256=9E2IfTaI6XRqfwdy-m-6laG7cTq9tlm8kMhldLJznPw,1625
102
+ etlplus/file/sas7bdat.py,sha256=y_SOBwGPksIvMdO60PoYIVrmppWKvZQfhJSHMABDDlg,1706
103
+ etlplus/file/sav.py,sha256=9cd1curI6gkhXNJPTQP30CUwXdH45qGmPau5JCNmxqg,1597
91
104
  etlplus/file/sqlite.py,sha256=3YRGMB5cRwdZeUVq3J_jSKauad7s8wWHWviqx7yfrUw,1652
92
105
  etlplus/file/stub.py,sha256=UPiKD_CYkz66X6bZtSqWX3ShBFrMlf-Se83z4qYnIR4,1733
106
+ etlplus/file/sylk.py,sha256=ZqWNAuJenydVYG75a4atRtSQ1iPAscvx-v6lUqdDqvg,1657
93
107
  etlplus/file/tab.py,sha256=yIbgIM8jkbOmCmewYnDeL4751tHSjVszMIxNlm9C3q8,1984
94
- etlplus/file/toml.py,sha256=GJ37L3iHwHKksUXCiYz89b490_dwqRVoh3-2bsrSOWI,1642
108
+ etlplus/file/toml.py,sha256=Z9UgUJ-PKdlA78osRyARK5AVN7AepSuq4dbUUXTGNAE,1626
95
109
  etlplus/file/tsv.py,sha256=hKlJd8Q7waZs9_jhRANhmb-fQdPsbvaVG46gYuNVtq0,1766
96
110
  etlplus/file/txt.py,sha256=46gSCxPn3SsixtR3RQ-kziaY5cnApHgRbW7UP__9ryE,2313
111
+ etlplus/file/vm.py,sha256=_EiHtFOxcSwoLb5qegZ0sDr5z9TwKQPbB-MQolb6I2A,1589
112
+ etlplus/file/wks.py,sha256=QwsjgcIpaYMZb-NEzgNSRKdBEqhahuoTeAVA5VEmsag,1655
97
113
  etlplus/file/xls.py,sha256=P94lEH8ZMex_G5x1hotidcj-dvGHAnUY7ouzvSYaV7o,1772
114
+ etlplus/file/xlsm.py,sha256=6meoukAvpEIm_mvVomIo2oefPYfmHHXfE1XmFfeFpvY,1738
98
115
  etlplus/file/xlsx.py,sha256=vtiAS8Ng9FV1vCWYTd1YO2ORKIJG3HDfmqy3NkVpt0A,2182
99
116
  etlplus/file/xml.py,sha256=p5P60DiV6hyiz-t970d0d0ZXB41gVvAm3MT7dTMULa8,4360
117
+ etlplus/file/xpt.py,sha256=JLqOkZ60awNsPXSqLKcPUwqZLPhPR05zk4EVRdEfvoU,1702
100
118
  etlplus/file/yaml.py,sha256=8BEqCELaTQ_nRu1iksLBHVj19P6JmcUf5__fe0yVigw,2449
101
119
  etlplus/file/zip.py,sha256=nd26V3S0edklriKnKOGDTLlO8RBXTda_zLLEQrJgKL4,4185
120
+ etlplus/file/zsav.py,sha256=2WxjXamvzj0adDbWGMWM3-cj_LsCRjyZz4J907lNkPk,1664
102
121
  etlplus/templates/README.md,sha256=kHSZ8FWcrlrcWz0hBIbho-k1Bi-PL-DQ7g02o-g70c8,1355
103
122
  etlplus/templates/__init__.py,sha256=tsniN7XJYs3NwYxJ6c2HD5upHP3CDkLx-bQCMt97UOM,106
104
123
  etlplus/templates/ddl.sql.j2,sha256=s8fMWvcb4eaJVXkifuib1aQPljtZ8buuyB_uA-ZdU3Q,4734
@@ -106,9 +125,9 @@ etlplus/templates/view.sql.j2,sha256=Iy8DHfhq5yyvrUKDxqp_aHIEXY4Tm6j4wT7YDEFWAhk
106
125
  etlplus/validation/README.md,sha256=qusyiyJu2DsaK80jlwfXVZ0iDgeuTPOX2EL3a_fcFiw,1401
107
126
  etlplus/validation/__init__.py,sha256=Pe5Xg1_EA4uiNZGYu5WTF3j7odjmyxnAJ8rcioaplSQ,1254
108
127
  etlplus/validation/utils.py,sha256=Mtqg449VIke0ziy_wd2r6yrwJzQkA1iulZC87FzXMjo,10201
109
- etlplus-0.12.10.dist-info/licenses/LICENSE,sha256=MuNO63i6kWmgnV2pbP2SLqP54mk1BGmu7CmbtxMmT-U,1069
110
- etlplus-0.12.10.dist-info/METADATA,sha256=Ktx5wLuLA6nVhYLjDVz3OQVog-b_u9FQY4vD3r_lgoQ,26886
111
- etlplus-0.12.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
112
- etlplus-0.12.10.dist-info/entry_points.txt,sha256=6w-2-jzuPa55spzK34h-UKh2JTEShh38adFRONNP9QE,45
113
- etlplus-0.12.10.dist-info/top_level.txt,sha256=aWWF-udn_sLGuHTM6W6MLh99ArS9ROkUWO8Mi8y1_2U,8
114
- etlplus-0.12.10.dist-info/RECORD,,
128
+ etlplus-0.12.12.dist-info/licenses/LICENSE,sha256=MuNO63i6kWmgnV2pbP2SLqP54mk1BGmu7CmbtxMmT-U,1069
129
+ etlplus-0.12.12.dist-info/METADATA,sha256=GsFkraquAsxEY-ldW-heU_9WKIMHXKANlc9FsKTRoN8,26886
130
+ etlplus-0.12.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
131
+ etlplus-0.12.12.dist-info/entry_points.txt,sha256=6w-2-jzuPa55spzK34h-UKh2JTEShh38adFRONNP9QE,45
132
+ etlplus-0.12.12.dist-info/top_level.txt,sha256=aWWF-udn_sLGuHTM6W6MLh99ArS9ROkUWO8Mi8y1_2U,8
133
+ etlplus-0.12.12.dist-info/RECORD,,