etlplus 0.12.3__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.
Files changed (66) hide show
  1. etlplus/file/_imports.py +141 -0
  2. etlplus/file/_io.py +1 -0
  3. etlplus/file/accdb.py +78 -0
  4. etlplus/file/arrow.py +78 -0
  5. etlplus/file/avro.py +17 -27
  6. etlplus/file/bson.py +77 -0
  7. etlplus/file/cbor.py +78 -0
  8. etlplus/file/cfg.py +79 -0
  9. etlplus/file/conf.py +80 -0
  10. etlplus/file/core.py +119 -84
  11. etlplus/file/csv.py +13 -1
  12. etlplus/file/dat.py +78 -0
  13. etlplus/file/dta.py +77 -0
  14. etlplus/file/duckdb.py +78 -0
  15. etlplus/file/enums.py +120 -15
  16. etlplus/file/feather.py +14 -2
  17. etlplus/file/fwf.py +77 -0
  18. etlplus/file/hbs.py +78 -0
  19. etlplus/file/hdf5.py +78 -0
  20. etlplus/file/ini.py +79 -0
  21. etlplus/file/ion.py +78 -0
  22. etlplus/file/jinja2.py +78 -0
  23. etlplus/file/json.py +13 -1
  24. etlplus/file/log.py +78 -0
  25. etlplus/file/mat.py +78 -0
  26. etlplus/file/mdb.py +78 -0
  27. etlplus/file/msgpack.py +78 -0
  28. etlplus/file/mustache.py +78 -0
  29. etlplus/file/nc.py +78 -0
  30. etlplus/file/ndjson.py +14 -15
  31. etlplus/file/numbers.py +75 -0
  32. etlplus/file/ods.py +79 -0
  33. etlplus/file/orc.py +14 -2
  34. etlplus/file/parquet.py +14 -2
  35. etlplus/file/pb.py +78 -0
  36. etlplus/file/pbf.py +77 -0
  37. etlplus/file/properties.py +78 -0
  38. etlplus/file/proto.py +77 -0
  39. etlplus/file/psv.py +79 -0
  40. etlplus/file/rda.py +78 -0
  41. etlplus/file/rds.py +78 -0
  42. etlplus/file/sas7bdat.py +78 -0
  43. etlplus/file/sav.py +77 -0
  44. etlplus/file/sqlite.py +78 -0
  45. etlplus/file/stub.py +84 -0
  46. etlplus/file/sylk.py +77 -0
  47. etlplus/file/tab.py +81 -0
  48. etlplus/file/toml.py +78 -0
  49. etlplus/file/tsv.py +14 -1
  50. etlplus/file/txt.py +13 -10
  51. etlplus/file/vm.py +78 -0
  52. etlplus/file/wks.py +77 -0
  53. etlplus/file/xls.py +1 -1
  54. etlplus/file/xlsm.py +79 -0
  55. etlplus/file/xlsx.py +1 -1
  56. etlplus/file/xml.py +12 -1
  57. etlplus/file/xpt.py +78 -0
  58. etlplus/file/yaml.py +15 -44
  59. etlplus/file/zsav.py +77 -0
  60. {etlplus-0.12.3.dist-info → etlplus-0.12.12.dist-info}/METADATA +119 -1
  61. {etlplus-0.12.3.dist-info → etlplus-0.12.12.dist-info}/RECORD +65 -23
  62. etlplus/file/_pandas.py +0 -58
  63. {etlplus-0.12.3.dist-info → etlplus-0.12.12.dist-info}/WHEEL +0 -0
  64. {etlplus-0.12.3.dist-info → etlplus-0.12.12.dist-info}/entry_points.txt +0 -0
  65. {etlplus-0.12.3.dist-info → etlplus-0.12.12.dist-info}/licenses/LICENSE +0 -0
  66. {etlplus-0.12.3.dist-info → etlplus-0.12.12.dist-info}/top_level.txt +0 -0
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/yaml.py CHANGED
@@ -1,19 +1,30 @@
1
1
  """
2
2
  :mod:`etlplus.file.yaml` module.
3
3
 
4
- Helpers for reading/writing YAML files.
4
+ Helpers for reading/writing YAML Ain't Markup Language (YAML) files.
5
+
6
+ Notes
7
+ -----
8
+ - A YAML file is a human-readable data serialization format.
9
+ - Common cases:
10
+ - Configuration files.
11
+ - Data exchange between languages with different data structures.
12
+ - Complex data storage.
13
+ - Rule of thumb:
14
+ - If the file follows the YAML specification, use this module for
15
+ reading and writing.
5
16
  """
6
17
 
7
18
  from __future__ import annotations
8
19
 
9
20
  from pathlib import Path
10
- from typing import Any
11
21
  from typing import cast
12
22
 
13
23
  from ..types import JSONData
14
24
  from ..types import JSONDict
15
25
  from ..types import JSONList
16
26
  from ..utils import count_records
27
+ from ._imports import get_yaml
17
28
 
18
29
  # SECTION: EXPORTS ========================================================== #
19
30
 
@@ -24,43 +35,6 @@ __all__ = [
24
35
  ]
25
36
 
26
37
 
27
- # SECTION: INTERNAL CONSTANTS =============================================== #
28
-
29
-
30
- # Optional YAML support (lazy-loaded to avoid hard dependency)
31
- # Cached access function to avoid global statements.
32
- _YAML_CACHE: dict[str, Any] = {}
33
-
34
-
35
- # SECTION: INTERNAL FUNCTIONS =============================================== #
36
-
37
-
38
- def _get_yaml() -> Any:
39
- """
40
- Return the PyYAML module, importing it on first use.
41
-
42
- Raises an informative ImportError if the optional dependency is missing.
43
- """
44
- mod = _YAML_CACHE.get('mod')
45
- if mod is not None: # pragma: no cover - tiny branch
46
- return mod
47
- try:
48
- _yaml_mod = __import__('yaml') # type: ignore[assignment]
49
- except ImportError as e: # pragma: no cover
50
- raise ImportError(
51
- 'YAML support requires optional dependency "PyYAML".\n'
52
- 'Install with: pip install PyYAML',
53
- ) from e
54
- _YAML_CACHE['mod'] = _yaml_mod
55
-
56
- return _yaml_mod
57
-
58
-
59
- def _require_yaml() -> None:
60
- """Ensure PyYAML is available or raise an informative error."""
61
- _get_yaml()
62
-
63
-
64
38
  # SECTION: FUNCTIONS ======================================================== #
65
39
 
66
40
 
@@ -87,10 +61,8 @@ def read(
87
61
  TypeError
88
62
  If the YAML root is not an object or an array of objects.
89
63
  """
90
- _require_yaml()
91
-
92
64
  with path.open('r', encoding='utf-8') as handle:
93
- loaded = _get_yaml().safe_load(handle)
65
+ loaded = get_yaml().safe_load(handle)
94
66
 
95
67
  if isinstance(loaded, dict):
96
68
  return cast(JSONDict, loaded)
@@ -124,9 +96,8 @@ def write(
124
96
  int
125
97
  The number of records written.
126
98
  """
127
- _require_yaml()
128
99
  with path.open('w', encoding='utf-8') as handle:
129
- _get_yaml().safe_dump(
100
+ get_yaml().safe_dump(
130
101
  data,
131
102
  handle,
132
103
  sort_keys=False,
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.3
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
@@ -68,6 +68,19 @@ package and command-line interface for data extraction, validation, transformati
68
68
  - [Features](#features)
69
69
  - [Installation](#installation)
70
70
  - [Quickstart](#quickstart)
71
+ - [Data Connectors](#data-connectors)
72
+ - [REST APIs (`api`)](#rest-apis-api)
73
+ - [Databases (`database`)](#databases-database)
74
+ - [Files (`file`)](#files-file)
75
+ - [Stubbed / Placeholder](#stubbed--placeholder)
76
+ - [Tabular \& Delimited Text](#tabular--delimited-text)
77
+ - [Semi-Structured Text](#semi-structured-text)
78
+ - [Columnar / Analytics-Friendly](#columnar--analytics-friendly)
79
+ - [Binary Serialization and Interchange](#binary-serialization-and-interchange)
80
+ - [Databases and Embedded Storage](#databases-and-embedded-storage)
81
+ - [Spreadsheets](#spreadsheets)
82
+ - [Data Archives](#data-archives)
83
+ - [Logs and Event Streams](#logs-and-event-streams)
71
84
  - [Usage](#usage)
72
85
  - [Command Line Interface](#command-line-interface)
73
86
  - [Argument Order and Required Options](#argument-order-and-required-options)
@@ -191,6 +204,111 @@ assert validate(filtered, rules)["valid"]
191
204
  load(filtered, "file", "temp/sample_output.json", file_format="json")
192
205
  ```
193
206
 
207
+ ## Data Connectors
208
+
209
+ Data connectors abstract sources from which to extract data and targets to which to load data. They
210
+ are differentiated by their types, each of which is represented in the subsections below.
211
+
212
+ ### REST APIs (`api`)
213
+
214
+ ETLPlus can extract from REST APIs and load results via common HTTP methods. Supported operations
215
+ include GET for extract and PATCH/POST/PUT for load.
216
+
217
+ ### Databases (`database`)
218
+
219
+ Database connectors use connection strings for extraction and loading, and
220
+ DDL can be rendered from table specs for migrations or schema checks.
221
+
222
+ ### Files (`file`)
223
+
224
+ File formats are grouped as in `FileFormat`. Support is marked as:
225
+
226
+ - **Y**: implemented (may require optional dependencies)
227
+ - **N**: stubbed or not yet implemented
228
+
229
+ #### Stubbed / Placeholder
230
+
231
+ | Format | Supported | Description |
232
+ | --- | --- | --- |
233
+ | `stub` | N | Placeholder format for tests and future connectors. |
234
+
235
+ #### Tabular & Delimited Text
236
+
237
+ | Format | Supported | Description |
238
+ | --- | --- | --- |
239
+ | `csv` | Y | Comma-Separated Values |
240
+ | `fwf` | N | Fixed-Width Fields |
241
+ | `dat` | N | Generic data file, often delimited or fixed-width |
242
+ | `psv` | N | Pipe-Separated Values |
243
+ | `tab` | N | Often synonymous with TSV |
244
+ | `tsv` | Y | Tab-Separated Values |
245
+ | `txt` | Y | Plain text, often delimited or fixed-width |
246
+
247
+ #### Semi-Structured Text
248
+
249
+ | Format | Supported | Description |
250
+ | --- | --- | --- |
251
+ | `cfg` | N | Config-style key-value pairs |
252
+ | `conf` | N | Config-style key-value pairs |
253
+ | `ini` | N | Config-style key-value pairs |
254
+ | `json` | Y | JavaScript Object Notation |
255
+ | `ndjson` | Y | Newline-Delimited JSON |
256
+ | `properties` | N | Java-style key-value pairs |
257
+ | `toml` | N | Tom's Obvious Minimal Language |
258
+ | `xml` | Y | Extensible Markup Language |
259
+ | `yaml` | Y | YAML Ain't Markup Language |
260
+
261
+ #### Columnar / Analytics-Friendly
262
+
263
+ | Format | Supported | Description |
264
+ | --- | --- | --- |
265
+ | `arrow` | N | Apache Arrow IPC |
266
+ | `feather` | Y | Apache Arrow Feather |
267
+ | `orc` | Y | Optimized Row Columnar; common in Hadoop |
268
+ | `parquet` | Y | Apache Parquet; common in Big Data |
269
+
270
+ #### Binary Serialization and Interchange
271
+
272
+ | Format | Supported | Description |
273
+ | --- | --- | --- |
274
+ | `avro` | Y | Apache Avro |
275
+ | `bson` | N | Binary JSON; common with MongoDB exports/dumps |
276
+ | `cbor` | N | Concise Binary Object Representation |
277
+ | `ion` | N | Amazon Ion |
278
+ | `msgpack` | N | MessagePack |
279
+ | `pb` | N | Protocol Buffers (Google Protobuf) |
280
+ | `pbf` | N | Protocolbuffer Binary Format; often for GIS data |
281
+ | `proto` | N | Protocol Buffers schema; often in .pb / .bin |
282
+
283
+ #### Databases and Embedded Storage
284
+
285
+ | Format | Supported | Description |
286
+ | --- | --- | --- |
287
+ | `accdb` | N | Microsoft Access database file (newer format) |
288
+ | `duckdb` | N | DuckDB database file |
289
+ | `mdb` | N | Microsoft Access database file (older format) |
290
+ | `sqlite` | N | SQLite database file |
291
+
292
+ #### Spreadsheets
293
+
294
+ | Format | Supported | Description |
295
+ | --- | --- | --- |
296
+ | `xls` | Y | Microsoft Excel (BIFF); read-only |
297
+ | `xlsx` | Y | Microsoft Excel (Open XML) |
298
+
299
+ #### Data Archives
300
+
301
+ | Format | Supported | Description |
302
+ | --- | --- | --- |
303
+ | `gz` | Y | Gzip-compressed file |
304
+ | `zip` | Y | ZIP archive |
305
+
306
+ #### Logs and Event Streams
307
+
308
+ | Format | Supported | Description |
309
+ | --- | --- | --- |
310
+ | `log` | N | Generic log file |
311
+
194
312
  ## Usage
195
313
 
196
314
  ### Command Line Interface
@@ -57,25 +57,67 @@ etlplus/database/schema.py,sha256=813C0Dd3WE53KTYot4dgjAxctgKXLXx-8_Rk_4r2e28,70
57
57
  etlplus/database/types.py,sha256=_pkQyC14TzAlgyeIqZG4F5LWYknZbHw3TW68Auk7Ya0,795
58
58
  etlplus/file/README.md,sha256=avWnyeKfs3uP3qa-DVBJ6t05jS2oFUPeQ3xf1Ph0eC0,3626
59
59
  etlplus/file/__init__.py,sha256=X03bosSM-uSd6dh3ur0un6_ozFRw2Tm4PE6kVUjtXK8,475
60
- etlplus/file/_io.py,sha256=kSbe4Bc9J8br7g856IzBvmKIWSSlng8vo66XN9Z2aiw,2917
61
- etlplus/file/_pandas.py,sha256=6ZqU7QzEMBq7OFl3mfEtotnKunpS3XV_GGRgz7SIHsI,1282
62
- etlplus/file/avro.py,sha256=JHK95zrwuHHICRe8f20xfKmeWzv1wP0Br5pOnINdLSc,4621
63
- etlplus/file/core.py,sha256=BkCliUez8SBEgpagxSeDbJixnX9QvD5XQp0dbYOOw0k,8692
64
- etlplus/file/csv.py,sha256=gtEUWJO54veEtgaLB_QnmR8yOpeToq78nrtAPVTTl44,1269
65
- etlplus/file/enums.py,sha256=rwrbwj6PejG0c5v6jzcsmeNu9cSqDyWB1foIuM5UyJo,6648
66
- etlplus/file/feather.py,sha256=WYZBn2f_Z7KDZZJ1eX0RS-934MnYIMydD0p2Oo30do4,2182
60
+ etlplus/file/_imports.py,sha256=9e8CWjyNIRcmiULEPuwtnJELUOXd4EvVv_vDnDYiB9c,3121
61
+ etlplus/file/_io.py,sha256=GXTcvjfXQX4rSdyu1JNhFmqQJlirDqd8dEGCN3dHvNg,2968
62
+ etlplus/file/accdb.py,sha256=xdBLrXHDonVJ1Z6-qZRrLBXpUwqw5nZYxDuxYMJHzVs,1681
63
+ etlplus/file/arrow.py,sha256=rYPqoCAI3cBHETYN3c0Xi7R5Nq7_prIdyESm3ll3Zos,1694
64
+ etlplus/file/avro.py,sha256=yFQMnWPcvC0CbDCyagoB9SHRIuvl2SXIoQJTBIlw4dA,4437
65
+ etlplus/file/bson.py,sha256=okCWQveCnaRxJ47Oy7-HpByEkiwmiSLSWc0a9eISuVg,1613
66
+ etlplus/file/cbor.py,sha256=hpXTqQ-ei4jYKt6-zq3frDXy-SWRpx1ThQUce6b01xU,1667
67
+ etlplus/file/cfg.py,sha256=cT2RKFgEMsAJaT9_EIPvYCzS4F9HdRJhEZTDMCVMZ4s,1710
68
+ etlplus/file/conf.py,sha256=TKkiuGf_r4pNlxKEgxn8d1Pza-4oeWZiYjvlpMk-un4,1768
69
+ etlplus/file/core.py,sha256=71AFsVwvAP6crsAphMkAmhqTwk_-TkEw9eByG6gwzpA,8862
70
+ etlplus/file/csv.py,sha256=6zXt7OKXm_6k8MrDyw8DdEwpQQrmrxG6myrDplF87_E,1744
71
+ etlplus/file/dat.py,sha256=j-GpY49SmkZtDUzZK6CbrHY9k6N83pyGcMqVGgJZ9cs,1642
72
+ etlplus/file/dta.py,sha256=cEprcahuYEncDYEBZiEoHyg-1jgBsr9eCHPLdI-naXM,1616
73
+ etlplus/file/duckdb.py,sha256=hQ8PWcvYILpkgPEtWeqbT_0yhQpJN9bJh1OwQQCcRD4,1631
74
+ etlplus/file/enums.py,sha256=O40_cHazyvLFTK1hSErK0a8EMYQy4TJPX4El7cXO3pc,11083
75
+ etlplus/file/feather.py,sha256=U19T5V_08ooK1STclE9nDvsnUFzu7nvQvi6J09iC-_0,2669
76
+ etlplus/file/fwf.py,sha256=WLbvL94cyLCOYfhABJvoIQc1fljtz3yOuA7X4Fc4QGo,1589
67
77
  etlplus/file/gz.py,sha256=NKsvIV7TIWn8USbvuZmRH9hr6OrXh4TzTfDykHD41Kk,2631
68
- etlplus/file/json.py,sha256=_KAXb4rZ1C8xnaV10IkihuFh1lhbWvajFOlMrBCNVjQ,2099
69
- etlplus/file/ndjson.py,sha256=gT-kgcqCUUSxtm2j-JMejoh65jk-njMvFwxKCquLZw0,2393
70
- etlplus/file/orc.py,sha256=GUrq9rgXCLBJ0i8Jd0Xsl4DzldDBg0FDxYhytb4OgxQ,2139
71
- etlplus/file/parquet.py,sha256=Tp2bi_PAIUdkzc25nArJp7beuUaudw5NdciV6IFHsdQ,2281
72
- etlplus/file/tsv.py,sha256=NiqF84Ck8e_DinaiO8yKRR6fVUTnUhpThzo4E1QUD8k,1271
73
- etlplus/file/txt.py,sha256=BStC7crpkGT4qddEeAD1_1mi_2-vQSXLj2DI-ddPFQE,2206
74
- etlplus/file/xls.py,sha256=83BbBJGxHAdbKH8Imz1l4mOgQT34uo-tyujp2WONRY4,1771
75
- etlplus/file/xlsx.py,sha256=mBKc3dSci9tk4KjQX3CaODwG1ueGtFAfztNUOaWYQAE,2181
76
- etlplus/file/xml.py,sha256=rYtCPvyLn9djClN2xKeqRCPsMXnvCH4R8zj94NJRdQc,4018
77
- etlplus/file/yaml.py,sha256=pWJf0rWyiRpOVOBAwVOosPsdIzuywZ_Cv8_tXLZ6RFw,3183
78
+ etlplus/file/hbs.py,sha256=iz0tIVNmsCYjTLnE5x-m3Smh5QKbfuQA-sgOHOZ_T3g,1614
79
+ etlplus/file/hdf5.py,sha256=SZ-UbXTJGOYA82hdma7AFulWo9emH5Kih_RXC7f-Bfk,1624
80
+ etlplus/file/ini.py,sha256=HlvQyQC00oBD8KFBfznPjBx9wF1ZwXH7Yo1JaXqCq8I,1701
81
+ etlplus/file/ion.py,sha256=9q938jROTAcuUT5sRYvS1qIeoz9p8KkVWYDDS2-2A_4,1710
82
+ etlplus/file/jinja2.py,sha256=FFqGQjBnRgPQ-oJ3WqiKspJMj6g_J0fDKGwsoOJAEzk,1630
83
+ etlplus/file/json.py,sha256=6EWsOI4RZo366FYsnPp-VkHdgAVBRVUwix-hAJZQM10,2537
84
+ etlplus/file/log.py,sha256=OmsGijXZn1VhN7BUklF8saoktxkmHh1MPLI_BbGDLyc,1681
85
+ etlplus/file/mat.py,sha256=u3jWMK8c4k9L0uVRiQSd7JgVQF-efoJj3QiKYtt1arA,1654
86
+ etlplus/file/mdb.py,sha256=hSCaxBbc_b9dGTBpR-Gb0UTY2r3zYUxoEiKuwpnx0kI,1657
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
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
93
+ etlplus/file/orc.py,sha256=fOO2jQwUr5FHbDve7ztmrE1Mb8uBMQtDo0yp-elVn8Q,2602
94
+ etlplus/file/parquet.py,sha256=nzMrUNQux7Of8Nn0c4d2WYuIJQwZY_xQiO_AuVMCzrI,2758
95
+ etlplus/file/pb.py,sha256=sg72vrjbp7azgEK_oRigmNdSqtEnsrBF24VjOohZhow,1615
96
+ etlplus/file/pbf.py,sha256=lcdehGK_g2drs0VFqTAxZO9-sv65SAkW894ttmlBG8I,1620
97
+ etlplus/file/properties.py,sha256=zsdaIWbSGGXH1bvlI8XPtc0eQCb-CeeA5CHJaqupNrE,1718
98
+ etlplus/file/proto.py,sha256=QnZMGYHmr6jyiQ08W7hx_MHzNDrPEmMmnbttNRlY4Pg,1668
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
104
+ etlplus/file/sqlite.py,sha256=3YRGMB5cRwdZeUVq3J_jSKauad7s8wWHWviqx7yfrUw,1652
105
+ etlplus/file/stub.py,sha256=UPiKD_CYkz66X6bZtSqWX3ShBFrMlf-Se83z4qYnIR4,1733
106
+ etlplus/file/sylk.py,sha256=ZqWNAuJenydVYG75a4atRtSQ1iPAscvx-v6lUqdDqvg,1657
107
+ etlplus/file/tab.py,sha256=yIbgIM8jkbOmCmewYnDeL4751tHSjVszMIxNlm9C3q8,1984
108
+ etlplus/file/toml.py,sha256=Z9UgUJ-PKdlA78osRyARK5AVN7AepSuq4dbUUXTGNAE,1626
109
+ etlplus/file/tsv.py,sha256=hKlJd8Q7waZs9_jhRANhmb-fQdPsbvaVG46gYuNVtq0,1766
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
113
+ etlplus/file/xls.py,sha256=P94lEH8ZMex_G5x1hotidcj-dvGHAnUY7ouzvSYaV7o,1772
114
+ etlplus/file/xlsm.py,sha256=6meoukAvpEIm_mvVomIo2oefPYfmHHXfE1XmFfeFpvY,1738
115
+ etlplus/file/xlsx.py,sha256=vtiAS8Ng9FV1vCWYTd1YO2ORKIJG3HDfmqy3NkVpt0A,2182
116
+ etlplus/file/xml.py,sha256=p5P60DiV6hyiz-t970d0d0ZXB41gVvAm3MT7dTMULa8,4360
117
+ etlplus/file/xpt.py,sha256=JLqOkZ60awNsPXSqLKcPUwqZLPhPR05zk4EVRdEfvoU,1702
118
+ etlplus/file/yaml.py,sha256=8BEqCELaTQ_nRu1iksLBHVj19P6JmcUf5__fe0yVigw,2449
78
119
  etlplus/file/zip.py,sha256=nd26V3S0edklriKnKOGDTLlO8RBXTda_zLLEQrJgKL4,4185
120
+ etlplus/file/zsav.py,sha256=2WxjXamvzj0adDbWGMWM3-cj_LsCRjyZz4J907lNkPk,1664
79
121
  etlplus/templates/README.md,sha256=kHSZ8FWcrlrcWz0hBIbho-k1Bi-PL-DQ7g02o-g70c8,1355
80
122
  etlplus/templates/__init__.py,sha256=tsniN7XJYs3NwYxJ6c2HD5upHP3CDkLx-bQCMt97UOM,106
81
123
  etlplus/templates/ddl.sql.j2,sha256=s8fMWvcb4eaJVXkifuib1aQPljtZ8buuyB_uA-ZdU3Q,4734
@@ -83,9 +125,9 @@ etlplus/templates/view.sql.j2,sha256=Iy8DHfhq5yyvrUKDxqp_aHIEXY4Tm6j4wT7YDEFWAhk
83
125
  etlplus/validation/README.md,sha256=qusyiyJu2DsaK80jlwfXVZ0iDgeuTPOX2EL3a_fcFiw,1401
84
126
  etlplus/validation/__init__.py,sha256=Pe5Xg1_EA4uiNZGYu5WTF3j7odjmyxnAJ8rcioaplSQ,1254
85
127
  etlplus/validation/utils.py,sha256=Mtqg449VIke0ziy_wd2r6yrwJzQkA1iulZC87FzXMjo,10201
86
- etlplus-0.12.3.dist-info/licenses/LICENSE,sha256=MuNO63i6kWmgnV2pbP2SLqP54mk1BGmu7CmbtxMmT-U,1069
87
- etlplus-0.12.3.dist-info/METADATA,sha256=pOs4RzpaFcMK7DkbD4k6pzh8BW7aPMUbT4rF1gcSKd4,22878
88
- etlplus-0.12.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
89
- etlplus-0.12.3.dist-info/entry_points.txt,sha256=6w-2-jzuPa55spzK34h-UKh2JTEShh38adFRONNP9QE,45
90
- etlplus-0.12.3.dist-info/top_level.txt,sha256=aWWF-udn_sLGuHTM6W6MLh99ArS9ROkUWO8Mi8y1_2U,8
91
- etlplus-0.12.3.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,,
etlplus/file/_pandas.py DELETED
@@ -1,58 +0,0 @@
1
- """
2
- :mod:`etlplus.file._pandas` module.
3
-
4
- Shared helpers for optional pandas usage.
5
- """
6
-
7
- from __future__ import annotations
8
-
9
- from typing import Any
10
-
11
- # SECTION: EXPORTS ========================================================== #
12
-
13
-
14
- __all__ = [
15
- 'get_pandas',
16
- ]
17
-
18
- # SECTION: INTERNAL CONSTANTS =============================================== #
19
-
20
-
21
- _PANDAS_CACHE: dict[str, Any] = {}
22
-
23
-
24
- # SECTION: FUNCTIONS ======================================================== #
25
-
26
-
27
- def get_pandas(format_name: str) -> Any:
28
- """
29
- Return the pandas module, importing it on first use.
30
-
31
- Parameters
32
- ----------
33
- format_name : str
34
- Human-readable format name for error messages.
35
-
36
- Returns
37
- -------
38
- Any
39
- The pandas module.
40
-
41
- Raises
42
- ------
43
- ImportError
44
- If the optional dependency is missing.
45
- """
46
- mod = _PANDAS_CACHE.get('mod')
47
- if mod is not None: # pragma: no cover - tiny branch
48
- return mod
49
- try:
50
- _pd = __import__('pandas') # type: ignore[assignment]
51
- except ImportError as e: # pragma: no cover
52
- raise ImportError(
53
- f'{format_name} support requires optional dependency "pandas".\n'
54
- 'Install with: pip install pandas',
55
- ) from e
56
- _PANDAS_CACHE['mod'] = _pd
57
-
58
- return _pd