etlplus 0.11.9__tar.gz → 0.11.11__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 (170) hide show
  1. {etlplus-0.11.9/etlplus.egg-info → etlplus-0.11.11}/PKG-INFO +1 -1
  2. etlplus-0.11.11/etlplus/file/avro.py +59 -0
  3. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/file/core.py +55 -0
  4. etlplus-0.11.11/etlplus/file/feather.py +59 -0
  5. etlplus-0.11.11/etlplus/file/gz.py +59 -0
  6. etlplus-0.11.11/etlplus/file/ndjson.py +59 -0
  7. etlplus-0.11.11/etlplus/file/orc.py +59 -0
  8. etlplus-0.11.11/etlplus/file/parquet.py +59 -0
  9. etlplus-0.11.11/etlplus/file/tsv.py +59 -0
  10. etlplus-0.11.11/etlplus/file/txt.py +59 -0
  11. etlplus-0.11.11/etlplus/file/xls.py +59 -0
  12. etlplus-0.11.11/etlplus/file/xlsx.py +59 -0
  13. etlplus-0.11.11/etlplus/file/zip.py +49 -0
  14. {etlplus-0.11.9 → etlplus-0.11.11/etlplus.egg-info}/PKG-INFO +1 -1
  15. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus.egg-info/SOURCES.txt +11 -0
  16. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/file/test_u_file_core.py +57 -0
  17. {etlplus-0.11.9 → etlplus-0.11.11}/.coveragerc +0 -0
  18. {etlplus-0.11.9 → etlplus-0.11.11}/.editorconfig +0 -0
  19. {etlplus-0.11.9 → etlplus-0.11.11}/.gitattributes +0 -0
  20. {etlplus-0.11.9 → etlplus-0.11.11}/.github/actions/python-bootstrap/action.yml +0 -0
  21. {etlplus-0.11.9 → etlplus-0.11.11}/.github/workflows/ci.yml +0 -0
  22. {etlplus-0.11.9 → etlplus-0.11.11}/.gitignore +0 -0
  23. {etlplus-0.11.9 → etlplus-0.11.11}/.pre-commit-config.yaml +0 -0
  24. {etlplus-0.11.9 → etlplus-0.11.11}/.ruff.toml +0 -0
  25. {etlplus-0.11.9 → etlplus-0.11.11}/CODE_OF_CONDUCT.md +0 -0
  26. {etlplus-0.11.9 → etlplus-0.11.11}/CONTRIBUTING.md +0 -0
  27. {etlplus-0.11.9 → etlplus-0.11.11}/DEMO.md +0 -0
  28. {etlplus-0.11.9 → etlplus-0.11.11}/LICENSE +0 -0
  29. {etlplus-0.11.9 → etlplus-0.11.11}/MANIFEST.in +0 -0
  30. {etlplus-0.11.9 → etlplus-0.11.11}/Makefile +0 -0
  31. {etlplus-0.11.9 → etlplus-0.11.11}/README.md +0 -0
  32. {etlplus-0.11.9 → etlplus-0.11.11}/REFERENCES.md +0 -0
  33. {etlplus-0.11.9 → etlplus-0.11.11}/docs/README.md +0 -0
  34. {etlplus-0.11.9 → etlplus-0.11.11}/docs/pipeline-guide.md +0 -0
  35. {etlplus-0.11.9 → etlplus-0.11.11}/docs/snippets/installation_version.md +0 -0
  36. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/__init__.py +0 -0
  37. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/__main__.py +0 -0
  38. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/__version__.py +0 -0
  39. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/api/README.md +0 -0
  40. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/api/__init__.py +0 -0
  41. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/api/auth.py +0 -0
  42. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/api/config.py +0 -0
  43. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/api/endpoint_client.py +0 -0
  44. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/api/errors.py +0 -0
  45. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/api/pagination/__init__.py +0 -0
  46. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/api/pagination/client.py +0 -0
  47. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/api/pagination/config.py +0 -0
  48. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/api/pagination/paginator.py +0 -0
  49. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/api/rate_limiting/__init__.py +0 -0
  50. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/api/rate_limiting/config.py +0 -0
  51. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/api/rate_limiting/rate_limiter.py +0 -0
  52. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/api/request_manager.py +0 -0
  53. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/api/retry_manager.py +0 -0
  54. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/api/transport.py +0 -0
  55. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/api/types.py +0 -0
  56. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/cli/__init__.py +0 -0
  57. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/cli/commands.py +0 -0
  58. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/cli/constants.py +0 -0
  59. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/cli/handlers.py +0 -0
  60. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/cli/io.py +0 -0
  61. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/cli/main.py +0 -0
  62. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/cli/options.py +0 -0
  63. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/cli/state.py +0 -0
  64. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/cli/types.py +0 -0
  65. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/config/__init__.py +0 -0
  66. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/config/connector.py +0 -0
  67. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/config/jobs.py +0 -0
  68. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/config/pipeline.py +0 -0
  69. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/config/profile.py +0 -0
  70. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/config/types.py +0 -0
  71. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/config/utils.py +0 -0
  72. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/database/__init__.py +0 -0
  73. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/database/ddl.py +0 -0
  74. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/database/engine.py +0 -0
  75. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/database/orm.py +0 -0
  76. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/database/schema.py +0 -0
  77. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/database/types.py +0 -0
  78. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/enums.py +0 -0
  79. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/extract.py +0 -0
  80. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/file/__init__.py +0 -0
  81. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/file/csv.py +0 -0
  82. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/file/enums.py +0 -0
  83. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/file/json.py +0 -0
  84. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/file/xml.py +0 -0
  85. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/file/yaml.py +0 -0
  86. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/load.py +0 -0
  87. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/mixins.py +0 -0
  88. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/py.typed +0 -0
  89. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/run.py +0 -0
  90. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/run_helpers.py +0 -0
  91. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/templates/__init__.py +0 -0
  92. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/templates/ddl.sql.j2 +0 -0
  93. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/templates/view.sql.j2 +0 -0
  94. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/transform.py +0 -0
  95. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/types.py +0 -0
  96. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/utils.py +0 -0
  97. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/validate.py +0 -0
  98. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/validation/__init__.py +0 -0
  99. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus/validation/utils.py +0 -0
  100. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus.egg-info/dependency_links.txt +0 -0
  101. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus.egg-info/entry_points.txt +0 -0
  102. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus.egg-info/requires.txt +0 -0
  103. {etlplus-0.11.9 → etlplus-0.11.11}/etlplus.egg-info/top_level.txt +0 -0
  104. {etlplus-0.11.9 → etlplus-0.11.11}/examples/README.md +0 -0
  105. {etlplus-0.11.9 → etlplus-0.11.11}/examples/configs/ddl_spec.yml +0 -0
  106. {etlplus-0.11.9 → etlplus-0.11.11}/examples/configs/pipeline.yml +0 -0
  107. {etlplus-0.11.9 → etlplus-0.11.11}/examples/data/sample.csv +0 -0
  108. {etlplus-0.11.9 → etlplus-0.11.11}/examples/data/sample.json +0 -0
  109. {etlplus-0.11.9 → etlplus-0.11.11}/examples/data/sample.xml +0 -0
  110. {etlplus-0.11.9 → etlplus-0.11.11}/examples/data/sample.xsd +0 -0
  111. {etlplus-0.11.9 → etlplus-0.11.11}/examples/data/sample.yaml +0 -0
  112. {etlplus-0.11.9 → etlplus-0.11.11}/examples/quickstart_python.py +0 -0
  113. {etlplus-0.11.9 → etlplus-0.11.11}/pyproject.toml +0 -0
  114. {etlplus-0.11.9 → etlplus-0.11.11}/pytest.ini +0 -0
  115. {etlplus-0.11.9 → etlplus-0.11.11}/setup.cfg +0 -0
  116. {etlplus-0.11.9 → etlplus-0.11.11}/setup.py +0 -0
  117. {etlplus-0.11.9 → etlplus-0.11.11}/tests/__init__.py +0 -0
  118. {etlplus-0.11.9 → etlplus-0.11.11}/tests/conftest.py +0 -0
  119. {etlplus-0.11.9 → etlplus-0.11.11}/tests/integration/conftest.py +0 -0
  120. {etlplus-0.11.9 → etlplus-0.11.11}/tests/integration/test_i_cli.py +0 -0
  121. {etlplus-0.11.9 → etlplus-0.11.11}/tests/integration/test_i_examples_data_parity.py +0 -0
  122. {etlplus-0.11.9 → etlplus-0.11.11}/tests/integration/test_i_pagination_strategy.py +0 -0
  123. {etlplus-0.11.9 → etlplus-0.11.11}/tests/integration/test_i_pipeline_smoke.py +0 -0
  124. {etlplus-0.11.9 → etlplus-0.11.11}/tests/integration/test_i_pipeline_yaml_load.py +0 -0
  125. {etlplus-0.11.9 → etlplus-0.11.11}/tests/integration/test_i_run.py +0 -0
  126. {etlplus-0.11.9 → etlplus-0.11.11}/tests/integration/test_i_run_profile_pagination_defaults.py +0 -0
  127. {etlplus-0.11.9 → etlplus-0.11.11}/tests/integration/test_i_run_profile_rate_limit_defaults.py +0 -0
  128. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/api/conftest.py +0 -0
  129. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/api/test_u_auth.py +0 -0
  130. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/api/test_u_config.py +0 -0
  131. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/api/test_u_endpoint_client.py +0 -0
  132. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/api/test_u_mocks.py +0 -0
  133. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/api/test_u_pagination_client.py +0 -0
  134. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/api/test_u_pagination_config.py +0 -0
  135. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/api/test_u_paginator.py +0 -0
  136. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/api/test_u_rate_limit_config.py +0 -0
  137. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/api/test_u_rate_limiter.py +0 -0
  138. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/api/test_u_request_manager.py +0 -0
  139. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/api/test_u_retry_manager.py +0 -0
  140. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/api/test_u_transport.py +0 -0
  141. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/api/test_u_types.py +0 -0
  142. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/cli/conftest.py +0 -0
  143. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/cli/test_u_cli_handlers.py +0 -0
  144. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/cli/test_u_cli_io.py +0 -0
  145. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/cli/test_u_cli_main.py +0 -0
  146. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/cli/test_u_cli_state.py +0 -0
  147. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/config/test_u_config_utils.py +0 -0
  148. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/config/test_u_connector.py +0 -0
  149. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/config/test_u_jobs.py +0 -0
  150. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/config/test_u_pipeline.py +0 -0
  151. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/conftest.py +0 -0
  152. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/database/test_u_database_ddl.py +0 -0
  153. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/database/test_u_database_engine.py +0 -0
  154. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/database/test_u_database_orm.py +0 -0
  155. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/database/test_u_database_schema.py +0 -0
  156. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/file/test_u_file_enums.py +0 -0
  157. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/file/test_u_file_yaml.py +0 -0
  158. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/test_u_enums.py +0 -0
  159. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/test_u_extract.py +0 -0
  160. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/test_u_load.py +0 -0
  161. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/test_u_main.py +0 -0
  162. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/test_u_mixins.py +0 -0
  163. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/test_u_run.py +0 -0
  164. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/test_u_run_helpers.py +0 -0
  165. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/test_u_transform.py +0 -0
  166. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/test_u_utils.py +0 -0
  167. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/test_u_validate.py +0 -0
  168. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/test_u_version.py +0 -0
  169. {etlplus-0.11.9 → etlplus-0.11.11}/tests/unit/validation/test_u_validation_utils.py +0 -0
  170. {etlplus-0.11.9 → etlplus-0.11.11}/tools/update_demo_snippets.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: etlplus
3
- Version: 0.11.9
3
+ Version: 0.11.11
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
@@ -0,0 +1,59 @@
1
+ """
2
+ :mod:`etlplus.file.avro` module.
3
+
4
+ Stub helpers for AVRO read/write.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from pathlib import Path
10
+
11
+ from ..types import JSONData
12
+
13
+ # SECTION: EXPORTS ========================================================== #
14
+
15
+
16
+ def read(path: Path) -> JSONData:
17
+ """
18
+ Read AVRO content from ``path``.
19
+
20
+ Parameters
21
+ ----------
22
+ path : Path
23
+ Path to the AVRO file on disk.
24
+
25
+ Returns
26
+ -------
27
+ JSONData
28
+ Parsed payload.
29
+
30
+ Raises
31
+ ------
32
+ NotImplementedError
33
+ AVRO :func:`read` is not implemented yet.
34
+ """
35
+ raise NotImplementedError('AVRO read is not implemented yet')
36
+
37
+
38
+ def write(path: Path, data: JSONData) -> int:
39
+ """
40
+ Write ``data`` to AVRO at ``path``.
41
+
42
+ Parameters
43
+ ----------
44
+ path : Path
45
+ Path to the AVRO file on disk.
46
+ data : JSONData
47
+ Data to write.
48
+
49
+ Returns
50
+ -------
51
+ int
52
+ Number of records written.
53
+
54
+ Raises
55
+ ------
56
+ NotImplementedError
57
+ AVRO :func:`write` is not implemented yet.
58
+ """
59
+ raise NotImplementedError('AVRO write is not implemented yet')
@@ -11,10 +11,21 @@ from dataclasses import dataclass
11
11
  from pathlib import Path
12
12
 
13
13
  from ..types import JSONData
14
+ from . import avro
14
15
  from . import csv
16
+ from . import feather
17
+ from . import gz
15
18
  from . import json
19
+ from . import ndjson
20
+ from . import orc
21
+ from . import parquet
22
+ from . import tsv
23
+ from . import txt
24
+ from . import xls
25
+ from . import xlsx
16
26
  from . import xml
17
27
  from . import yaml
28
+ from . import zip
18
29
  from .enums import FileFormat
19
30
  from .enums import infer_file_format_and_compression
20
31
 
@@ -182,14 +193,36 @@ class File:
182
193
  self._assert_exists()
183
194
  fmt = self._ensure_format()
184
195
  match fmt:
196
+ case FileFormat.AVRO:
197
+ return avro.read(self.path)
185
198
  case FileFormat.CSV:
186
199
  return csv.read(self.path)
200
+ case FileFormat.FEATHER:
201
+ return feather.read(self.path)
202
+ case FileFormat.GZ:
203
+ return gz.read(self.path)
187
204
  case FileFormat.JSON:
188
205
  return json.read(self.path)
206
+ case FileFormat.NDJSON:
207
+ return ndjson.read(self.path)
208
+ case FileFormat.ORC:
209
+ return orc.read(self.path)
210
+ case FileFormat.PARQUET:
211
+ return parquet.read(self.path)
212
+ case FileFormat.TSV:
213
+ return tsv.read(self.path)
214
+ case FileFormat.TXT:
215
+ return txt.read(self.path)
216
+ case FileFormat.XLS:
217
+ return xls.read(self.path)
218
+ case FileFormat.XLSX:
219
+ return xlsx.read(self.path)
189
220
  case FileFormat.XML:
190
221
  return xml.read(self.path)
191
222
  case FileFormat.YAML:
192
223
  return yaml.read(self.path)
224
+ case FileFormat.ZIP:
225
+ return zip.read(self.path)
193
226
  raise ValueError(f'Unsupported format: {fmt}')
194
227
 
195
228
  def write(
@@ -221,12 +254,34 @@ class File:
221
254
  """
222
255
  fmt = self._ensure_format()
223
256
  match fmt:
257
+ case FileFormat.AVRO:
258
+ return avro.write(self.path, data)
224
259
  case FileFormat.CSV:
225
260
  return csv.write(self.path, data)
261
+ case FileFormat.FEATHER:
262
+ return feather.write(self.path, data)
263
+ case FileFormat.GZ:
264
+ return gz.write(self.path, data)
226
265
  case FileFormat.JSON:
227
266
  return json.write(self.path, data)
267
+ case FileFormat.NDJSON:
268
+ return ndjson.write(self.path, data)
269
+ case FileFormat.ORC:
270
+ return orc.write(self.path, data)
271
+ case FileFormat.PARQUET:
272
+ return parquet.write(self.path, data)
273
+ case FileFormat.TSV:
274
+ return tsv.write(self.path, data)
275
+ case FileFormat.TXT:
276
+ return txt.write(self.path, data)
277
+ case FileFormat.XLS:
278
+ return xls.write(self.path, data)
279
+ case FileFormat.XLSX:
280
+ return xlsx.write(self.path, data)
228
281
  case FileFormat.XML:
229
282
  return xml.write(self.path, data, root_tag=root_tag)
230
283
  case FileFormat.YAML:
231
284
  return yaml.write(self.path, data)
285
+ case FileFormat.ZIP:
286
+ return zip.write(self.path, data)
232
287
  raise ValueError(f'Unsupported format: {fmt}')
@@ -0,0 +1,59 @@
1
+ """
2
+ :mod:`etlplus.file.feather` module.
3
+
4
+ Stub helpers for FEATHER read/write.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from pathlib import Path
10
+
11
+ from ..types import JSONData
12
+
13
+ # SECTION: EXPORTS ========================================================== #
14
+
15
+
16
+ def read(path: Path) -> JSONData:
17
+ """
18
+ Read FEATHER content from ``path``.
19
+
20
+ Parameters
21
+ ----------
22
+ path : Path
23
+ Path to the FEATHER file on disk.
24
+
25
+ Returns
26
+ -------
27
+ JSONData
28
+ Parsed payload.
29
+
30
+ Raises
31
+ ------
32
+ NotImplementedError
33
+ FEATHER :func:`read` is not implemented yet.
34
+ """
35
+ raise NotImplementedError('FEATHER read is not implemented yet')
36
+
37
+
38
+ def write(path: Path, data: JSONData) -> int:
39
+ """
40
+ Write ``data`` to FEATHER at ``path``.
41
+
42
+ Parameters
43
+ ----------
44
+ path : Path
45
+ Path to the FEATHER file on disk.
46
+ data : JSONData
47
+ Data to write.
48
+
49
+ Returns
50
+ -------
51
+ int
52
+ Number of records written.
53
+
54
+ Raises
55
+ ------
56
+ NotImplementedError
57
+ FEATHER :func:`write` is not implemented yet.
58
+ """
59
+ raise NotImplementedError('FEATHER write is not implemented yet')
@@ -0,0 +1,59 @@
1
+ """
2
+ :mod:`etlplus.file.gz` module.
3
+
4
+ Stub helpers for GZ read/write.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from pathlib import Path
10
+
11
+ from ..types import JSONData
12
+
13
+ # SECTION: EXPORTS ========================================================== #
14
+
15
+
16
+ def read(path: Path) -> JSONData:
17
+ """
18
+ Read GZ content from ``path``.
19
+
20
+ Parameters
21
+ ----------
22
+ path : Path
23
+ Path to the GZ file on disk.
24
+
25
+ Returns
26
+ -------
27
+ JSONData
28
+ Parsed payload.
29
+
30
+ Raises
31
+ ------
32
+ NotImplementedError
33
+ GZ :func:`read` is not implemented yet.
34
+ """
35
+ raise NotImplementedError('GZ read is not implemented yet')
36
+
37
+
38
+ def write(path: Path, data: JSONData) -> int:
39
+ """
40
+ Write ``data`` to GZ at ``path``.
41
+
42
+ Parameters
43
+ ----------
44
+ path : Path
45
+ Path to the GZ file on disk.
46
+ data : JSONData
47
+ Data to write.
48
+
49
+ Returns
50
+ -------
51
+ int
52
+ Number of records written.
53
+
54
+ Raises
55
+ ------
56
+ NotImplementedError
57
+ GZ :func:`write` is not implemented yet.
58
+ """
59
+ raise NotImplementedError('GZ write is not implemented yet')
@@ -0,0 +1,59 @@
1
+ """
2
+ :mod:`etlplus.file.ndjson` module.
3
+
4
+ Stub helpers for NDJSON read/write.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from pathlib import Path
10
+
11
+ from ..types import JSONData
12
+
13
+ # SECTION: EXPORTS ========================================================== #
14
+
15
+
16
+ def read(path: Path) -> JSONData:
17
+ """
18
+ Read NDJSON content from ``path``.
19
+
20
+ Parameters
21
+ ----------
22
+ path : Path
23
+ Path to the NDJSON file on disk.
24
+
25
+ Returns
26
+ -------
27
+ JSONData
28
+ Parsed payload.
29
+
30
+ Raises
31
+ ------
32
+ NotImplementedError
33
+ NDJSON :func:`read` is not implemented yet.
34
+ """
35
+ raise NotImplementedError('NDJSON read is not implemented yet')
36
+
37
+
38
+ def write(path: Path, data: JSONData) -> int:
39
+ """
40
+ Write ``data`` to NDJSON at ``path``.
41
+
42
+ Parameters
43
+ ----------
44
+ path : Path
45
+ Path to the NDJSON file on disk.
46
+ data : JSONData
47
+ Data to write.
48
+
49
+ Returns
50
+ -------
51
+ int
52
+ Number of records written.
53
+
54
+ Raises
55
+ ------
56
+ NotImplementedError
57
+ NDJSON :func:`write` is not implemented yet.
58
+ """
59
+ raise NotImplementedError('NDJSON write is not implemented yet')
@@ -0,0 +1,59 @@
1
+ """
2
+ :mod:`etlplus.file.orc` module.
3
+
4
+ Stub helpers for ORC read/write.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from pathlib import Path
10
+
11
+ from ..types import JSONData
12
+
13
+ # SECTION: EXPORTS ========================================================== #
14
+
15
+
16
+ def read(path: Path) -> JSONData:
17
+ """
18
+ Read ORC content from ``path``.
19
+
20
+ Parameters
21
+ ----------
22
+ path : Path
23
+ Path to the ORC file on disk.
24
+
25
+ Returns
26
+ -------
27
+ JSONData
28
+ Parsed payload.
29
+
30
+ Raises
31
+ ------
32
+ NotImplementedError
33
+ ORC :func:`read` is not implemented yet.
34
+ """
35
+ raise NotImplementedError('ORC read is not implemented yet')
36
+
37
+
38
+ def write(path: Path, data: JSONData) -> int:
39
+ """
40
+ Write ``data`` to ORC at ``path``.
41
+
42
+ Parameters
43
+ ----------
44
+ path : Path
45
+ Path to the ORC file on disk.
46
+ data : JSONData
47
+ Data to write.
48
+
49
+ Returns
50
+ -------
51
+ int
52
+ Number of records written.
53
+
54
+ Raises
55
+ ------
56
+ NotImplementedError
57
+ ORC :func:`write` is not implemented yet.
58
+ """
59
+ raise NotImplementedError('ORC write is not implemented yet')
@@ -0,0 +1,59 @@
1
+ """
2
+ :mod:`etlplus.file.parquet` module.
3
+
4
+ Stub helpers for PARQUET read/write.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from pathlib import Path
10
+
11
+ from ..types import JSONData
12
+
13
+ # SECTION: EXPORTS ========================================================== #
14
+
15
+
16
+ def read(path: Path) -> JSONData:
17
+ """
18
+ Read PARQUET content from ``path``.
19
+
20
+ Parameters
21
+ ----------
22
+ path : Path
23
+ Path to the PARQUET file on disk.
24
+
25
+ Returns
26
+ -------
27
+ JSONData
28
+ Parsed payload.
29
+
30
+ Raises
31
+ ------
32
+ NotImplementedError
33
+ PARQUET :func:`read` is not implemented yet.
34
+ """
35
+ raise NotImplementedError('PARQUET read is not implemented yet')
36
+
37
+
38
+ def write(path: Path, data: JSONData) -> int:
39
+ """
40
+ Write ``data`` to PARQUET at ``path``.
41
+
42
+ Parameters
43
+ ----------
44
+ path : Path
45
+ Path to the PARQUET file on disk.
46
+ data : JSONData
47
+ Data to write.
48
+
49
+ Returns
50
+ -------
51
+ int
52
+ Number of records written.
53
+
54
+ Raises
55
+ ------
56
+ NotImplementedError
57
+ PARQUET :func:`write` is not implemented yet.
58
+ """
59
+ raise NotImplementedError('PARQUET write is not implemented yet')
@@ -0,0 +1,59 @@
1
+ """
2
+ :mod:`etlplus.file.tsv` module.
3
+
4
+ Stub helpers for TSV read/write.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from pathlib import Path
10
+
11
+ from ..types import JSONData
12
+
13
+ # SECTION: EXPORTS ========================================================== #
14
+
15
+
16
+ def read(path: Path) -> JSONData:
17
+ """
18
+ Read TSV content from ``path``.
19
+
20
+ Parameters
21
+ ----------
22
+ path : Path
23
+ Path to the TSV file on disk.
24
+
25
+ Returns
26
+ -------
27
+ JSONData
28
+ Parsed payload.
29
+
30
+ Raises
31
+ ------
32
+ NotImplementedError
33
+ TSV :func:`read` is not implemented yet.
34
+ """
35
+ raise NotImplementedError('TSV read is not implemented yet')
36
+
37
+
38
+ def write(path: Path, data: JSONData) -> int:
39
+ """
40
+ Write ``data`` to TSV at ``path``.
41
+
42
+ Parameters
43
+ ----------
44
+ path : Path
45
+ Path to the TSV file on disk.
46
+ data : JSONData
47
+ Data to write.
48
+
49
+ Returns
50
+ -------
51
+ int
52
+ Number of records written.
53
+
54
+ Raises
55
+ ------
56
+ NotImplementedError
57
+ TSV :func:`write` is not implemented yet.
58
+ """
59
+ raise NotImplementedError('TSV write is not implemented yet')
@@ -0,0 +1,59 @@
1
+ """
2
+ :mod:`etlplus.file.txt` module.
3
+
4
+ Stub helpers for TXT read/write.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from pathlib import Path
10
+
11
+ from ..types import JSONData
12
+
13
+ # SECTION: EXPORTS ========================================================== #
14
+
15
+
16
+ def read(path: Path) -> JSONData:
17
+ """
18
+ Read TXT content from ``path``.
19
+
20
+ Parameters
21
+ ----------
22
+ path : Path
23
+ Path to the TXT file on disk.
24
+
25
+ Returns
26
+ -------
27
+ JSONData
28
+ Parsed payload.
29
+
30
+ Raises
31
+ ------
32
+ NotImplementedError
33
+ TXT :func:`read` is not implemented yet.
34
+ """
35
+ raise NotImplementedError('TXT read is not implemented yet')
36
+
37
+
38
+ def write(path: Path, data: JSONData) -> int:
39
+ """
40
+ Write ``data`` to TXT at ``path``.
41
+
42
+ Parameters
43
+ ----------
44
+ path : Path
45
+ Path to the TXT file on disk.
46
+ data : JSONData
47
+ Data to write.
48
+
49
+ Returns
50
+ -------
51
+ int
52
+ Number of records written.
53
+
54
+ Raises
55
+ ------
56
+ NotImplementedError
57
+ TXT :func:`write` is not implemented yet.
58
+ """
59
+ raise NotImplementedError('TXT write is not implemented yet')
@@ -0,0 +1,59 @@
1
+ """
2
+ :mod:`etlplus.file.xls` module.
3
+
4
+ Stub helpers for XLS read/write.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from pathlib import Path
10
+
11
+ from ..types import JSONData
12
+
13
+ # SECTION: EXPORTS ========================================================== #
14
+
15
+
16
+ def read(path: Path) -> JSONData:
17
+ """
18
+ Read XLS content from ``path``.
19
+
20
+ Parameters
21
+ ----------
22
+ path : Path
23
+ Path to the XLS file on disk.
24
+
25
+ Returns
26
+ -------
27
+ JSONData
28
+ Parsed payload.
29
+
30
+ Raises
31
+ ------
32
+ NotImplementedError
33
+ XLS :func:`read` is not implemented yet.
34
+ """
35
+ raise NotImplementedError('XLS read is not implemented yet')
36
+
37
+
38
+ def write(path: Path, data: JSONData) -> int:
39
+ """
40
+ Write ``data`` to XLS at ``path``.
41
+
42
+ Parameters
43
+ ----------
44
+ path : Path
45
+ Path to the XLS file on disk.
46
+ data : JSONData
47
+ Data to write.
48
+
49
+ Returns
50
+ -------
51
+ int
52
+ Number of records written.
53
+
54
+ Raises
55
+ ------
56
+ NotImplementedError
57
+ XLS :func:`write` is not implemented yet.
58
+ """
59
+ raise NotImplementedError('XLS write is not implemented yet')
@@ -0,0 +1,59 @@
1
+ """
2
+ :mod:`etlplus.file.xlsx` module.
3
+
4
+ Stub helpers for XLSX read/write.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from pathlib import Path
10
+
11
+ from ..types import JSONData
12
+
13
+ # SECTION: EXPORTS ========================================================== #
14
+
15
+
16
+ def read(path: Path) -> JSONData:
17
+ """
18
+ Read XLSX content from ``path``.
19
+
20
+ Parameters
21
+ ----------
22
+ path : Path
23
+ Path to the XLSX file on disk.
24
+
25
+ Returns
26
+ -------
27
+ JSONData
28
+ Parsed payload.
29
+
30
+ Raises
31
+ ------
32
+ NotImplementedError
33
+ XLSX :func:`read` is not implemented yet.
34
+ """
35
+ raise NotImplementedError('XLSX read is not implemented yet')
36
+
37
+
38
+ def write(path: Path, data: JSONData) -> int:
39
+ """
40
+ Write ``data`` to XLSX at ``path``.
41
+
42
+ Parameters
43
+ ----------
44
+ path : Path
45
+ Path to the XLSX file on disk.
46
+ data : JSONData
47
+ Data to write.
48
+
49
+ Returns
50
+ -------
51
+ int
52
+ Number of records written.
53
+
54
+ Raises
55
+ ------
56
+ NotImplementedError
57
+ XLSX :func:`write` is not implemented yet.
58
+ """
59
+ raise NotImplementedError('XLSX write is not implemented yet')