etlplus 0.16.10__tar.gz → 0.17.3__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 (262) hide show
  1. {etlplus-0.16.10 → etlplus-0.17.3}/.github/workflows/ci.yml +5 -1
  2. {etlplus-0.16.10 → etlplus-0.17.3}/.ruff.toml +4 -0
  3. {etlplus-0.16.10 → etlplus-0.17.3}/Makefile +10 -2
  4. {etlplus-0.16.10/etlplus.egg-info → etlplus-0.17.3}/PKG-INFO +44 -26
  5. {etlplus-0.16.10 → etlplus-0.17.3}/README.md +31 -25
  6. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/README.md +33 -0
  7. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/_imports.py +35 -20
  8. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/_io.py +138 -15
  9. etlplus-0.17.3/etlplus/file/_r.py +48 -0
  10. etlplus-0.17.3/etlplus/file/_sql.py +224 -0
  11. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/accdb.py +7 -6
  12. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/arrow.py +29 -10
  13. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/avro.py +13 -10
  14. etlplus-0.17.3/etlplus/file/bson.py +163 -0
  15. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/cbor.py +29 -17
  16. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/cfg.py +7 -6
  17. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/conf.py +7 -6
  18. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/core.py +1 -1
  19. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/csv.py +8 -7
  20. etlplus-0.17.3/etlplus/file/dat.py +120 -0
  21. etlplus-0.17.3/etlplus/file/dta.py +98 -0
  22. etlplus-0.17.3/etlplus/file/duckdb.py +141 -0
  23. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/enums.py +29 -0
  24. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/feather.py +15 -30
  25. etlplus-0.17.3/etlplus/file/fwf.py +113 -0
  26. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/gz.py +12 -7
  27. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/hbs.py +7 -6
  28. etlplus-0.17.3/etlplus/file/hdf5.py +143 -0
  29. etlplus-0.17.3/etlplus/file/ini.py +124 -0
  30. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/ion.py +7 -6
  31. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/jinja2.py +7 -6
  32. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/json.py +10 -11
  33. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/log.py +7 -6
  34. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/mat.py +7 -6
  35. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/mdb.py +7 -6
  36. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/msgpack.py +27 -15
  37. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/mustache.py +7 -6
  38. etlplus-0.17.3/etlplus/file/nc.py +137 -0
  39. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/ndjson.py +10 -6
  40. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/numbers.py +7 -6
  41. etlplus-0.17.3/etlplus/file/ods.py +118 -0
  42. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/orc.py +15 -30
  43. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/parquet.py +10 -6
  44. etlplus-0.17.3/etlplus/file/pb.py +92 -0
  45. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/pbf.py +7 -6
  46. etlplus-0.17.3/etlplus/file/properties.py +106 -0
  47. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/proto.py +24 -18
  48. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/psv.py +12 -11
  49. etlplus-0.17.3/etlplus/file/rda.py +122 -0
  50. etlplus-0.17.3/etlplus/file/rds.py +115 -0
  51. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/sas7bdat.py +26 -16
  52. etlplus-0.17.3/etlplus/file/sav.py +96 -0
  53. etlplus-0.17.3/etlplus/file/sqlite.py +140 -0
  54. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/stub.py +8 -6
  55. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/sylk.py +7 -6
  56. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/tab.py +13 -13
  57. etlplus-0.17.3/etlplus/file/toml.py +119 -0
  58. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/tsv.py +8 -7
  59. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/txt.py +10 -7
  60. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/vm.py +7 -6
  61. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/wks.py +7 -6
  62. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/xls.py +8 -5
  63. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/xlsm.py +48 -10
  64. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/xlsx.py +10 -6
  65. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/xml.py +11 -9
  66. etlplus-0.17.3/etlplus/file/xpt.py +116 -0
  67. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/yaml.py +10 -11
  68. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/zip.py +10 -5
  69. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/zsav.py +7 -6
  70. {etlplus-0.16.10 → etlplus-0.17.3/etlplus.egg-info}/PKG-INFO +44 -26
  71. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus.egg-info/SOURCES.txt +2 -0
  72. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus.egg-info/requires.txt +13 -0
  73. {etlplus-0.16.10 → etlplus-0.17.3}/pyproject.toml +14 -0
  74. {etlplus-0.16.10 → etlplus-0.17.3}/setup.py +14 -0
  75. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/file/test_u_file_core.py +166 -59
  76. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/ops/test_u_ops_extract.py +0 -5
  77. etlplus-0.16.10/etlplus/file/bson.py +0 -79
  78. etlplus-0.16.10/etlplus/file/dat.py +0 -79
  79. etlplus-0.16.10/etlplus/file/dta.py +0 -78
  80. etlplus-0.16.10/etlplus/file/duckdb.py +0 -80
  81. etlplus-0.16.10/etlplus/file/fwf.py +0 -79
  82. etlplus-0.16.10/etlplus/file/hdf5.py +0 -80
  83. etlplus-0.16.10/etlplus/file/ini.py +0 -81
  84. etlplus-0.16.10/etlplus/file/nc.py +0 -79
  85. etlplus-0.16.10/etlplus/file/ods.py +0 -81
  86. etlplus-0.16.10/etlplus/file/pb.py +0 -80
  87. etlplus-0.16.10/etlplus/file/properties.py +0 -80
  88. etlplus-0.16.10/etlplus/file/rda.py +0 -80
  89. etlplus-0.16.10/etlplus/file/rds.py +0 -79
  90. etlplus-0.16.10/etlplus/file/sav.py +0 -78
  91. etlplus-0.16.10/etlplus/file/sqlite.py +0 -80
  92. etlplus-0.16.10/etlplus/file/toml.py +0 -80
  93. etlplus-0.16.10/etlplus/file/xpt.py +0 -80
  94. {etlplus-0.16.10 → etlplus-0.17.3}/.coveragerc +0 -0
  95. {etlplus-0.16.10 → etlplus-0.17.3}/.editorconfig +0 -0
  96. {etlplus-0.16.10 → etlplus-0.17.3}/.gitattributes +0 -0
  97. {etlplus-0.16.10 → etlplus-0.17.3}/.github/actions/python-bootstrap/action.yml +0 -0
  98. {etlplus-0.16.10 → etlplus-0.17.3}/.gitignore +0 -0
  99. {etlplus-0.16.10 → etlplus-0.17.3}/.pre-commit-config.yaml +0 -0
  100. {etlplus-0.16.10 → etlplus-0.17.3}/CODE_OF_CONDUCT.md +0 -0
  101. {etlplus-0.16.10 → etlplus-0.17.3}/CONTRIBUTING.md +0 -0
  102. {etlplus-0.16.10 → etlplus-0.17.3}/DEMO.md +0 -0
  103. {etlplus-0.16.10 → etlplus-0.17.3}/LICENSE +0 -0
  104. {etlplus-0.16.10 → etlplus-0.17.3}/MANIFEST.in +0 -0
  105. {etlplus-0.16.10 → etlplus-0.17.3}/REFERENCES.md +0 -0
  106. {etlplus-0.16.10 → etlplus-0.17.3}/SECURITY.md +0 -0
  107. {etlplus-0.16.10 → etlplus-0.17.3}/SUPPORT.md +0 -0
  108. {etlplus-0.16.10 → etlplus-0.17.3}/docs/README.md +0 -0
  109. {etlplus-0.16.10 → etlplus-0.17.3}/docs/pipeline-guide.md +0 -0
  110. {etlplus-0.16.10 → etlplus-0.17.3}/docs/snippets/installation_version.md +0 -0
  111. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/README.md +0 -0
  112. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/__init__.py +0 -0
  113. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/__main__.py +0 -0
  114. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/__version__.py +0 -0
  115. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/api/README.md +0 -0
  116. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/api/__init__.py +0 -0
  117. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/api/auth.py +0 -0
  118. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/api/config.py +0 -0
  119. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/api/endpoint_client.py +0 -0
  120. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/api/enums.py +0 -0
  121. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/api/errors.py +0 -0
  122. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/api/pagination/__init__.py +0 -0
  123. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/api/pagination/client.py +0 -0
  124. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/api/pagination/config.py +0 -0
  125. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/api/pagination/paginator.py +0 -0
  126. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/api/rate_limiting/__init__.py +0 -0
  127. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/api/rate_limiting/config.py +0 -0
  128. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/api/rate_limiting/rate_limiter.py +0 -0
  129. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/api/request_manager.py +0 -0
  130. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/api/retry_manager.py +0 -0
  131. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/api/transport.py +0 -0
  132. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/api/types.py +0 -0
  133. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/api/utils.py +0 -0
  134. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/cli/README.md +0 -0
  135. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/cli/__init__.py +0 -0
  136. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/cli/commands.py +0 -0
  137. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/cli/constants.py +0 -0
  138. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/cli/handlers.py +0 -0
  139. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/cli/io.py +0 -0
  140. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/cli/main.py +0 -0
  141. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/cli/options.py +0 -0
  142. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/cli/state.py +0 -0
  143. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/cli/types.py +0 -0
  144. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/config.py +0 -0
  145. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/connector/__init__.py +0 -0
  146. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/connector/api.py +0 -0
  147. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/connector/connector.py +0 -0
  148. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/connector/core.py +0 -0
  149. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/connector/database.py +0 -0
  150. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/connector/enums.py +0 -0
  151. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/connector/file.py +0 -0
  152. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/connector/types.py +0 -0
  153. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/connector/utils.py +0 -0
  154. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/database/README.md +0 -0
  155. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/database/__init__.py +0 -0
  156. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/database/ddl.py +0 -0
  157. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/database/engine.py +0 -0
  158. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/database/orm.py +0 -0
  159. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/database/schema.py +0 -0
  160. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/database/types.py +0 -0
  161. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/enums.py +0 -0
  162. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/file/__init__.py +0 -0
  163. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/mixins.py +0 -0
  164. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/ops/README.md +0 -0
  165. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/ops/__init__.py +0 -0
  166. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/ops/enums.py +0 -0
  167. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/ops/extract.py +0 -0
  168. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/ops/load.py +0 -0
  169. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/ops/run.py +0 -0
  170. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/ops/transform.py +0 -0
  171. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/ops/types.py +0 -0
  172. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/ops/utils.py +0 -0
  173. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/ops/validate.py +0 -0
  174. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/py.typed +0 -0
  175. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/templates/README.md +0 -0
  176. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/templates/__init__.py +0 -0
  177. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/templates/ddl.sql.j2 +0 -0
  178. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/templates/view.sql.j2 +0 -0
  179. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/types.py +0 -0
  180. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/utils.py +0 -0
  181. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/workflow/README.md +0 -0
  182. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/workflow/__init__.py +0 -0
  183. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/workflow/dag.py +0 -0
  184. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/workflow/jobs.py +0 -0
  185. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus/workflow/profile.py +0 -0
  186. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus.egg-info/dependency_links.txt +0 -0
  187. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus.egg-info/entry_points.txt +0 -0
  188. {etlplus-0.16.10 → etlplus-0.17.3}/etlplus.egg-info/top_level.txt +0 -0
  189. {etlplus-0.16.10 → etlplus-0.17.3}/examples/README.md +0 -0
  190. {etlplus-0.16.10 → etlplus-0.17.3}/examples/configs/ddl_spec.yml +0 -0
  191. {etlplus-0.16.10 → etlplus-0.17.3}/examples/configs/pipeline.yml +0 -0
  192. {etlplus-0.16.10 → etlplus-0.17.3}/examples/data/sample.csv +0 -0
  193. {etlplus-0.16.10 → etlplus-0.17.3}/examples/data/sample.json +0 -0
  194. {etlplus-0.16.10 → etlplus-0.17.3}/examples/data/sample.xml +0 -0
  195. {etlplus-0.16.10 → etlplus-0.17.3}/examples/data/sample.xsd +0 -0
  196. {etlplus-0.16.10 → etlplus-0.17.3}/examples/data/sample.yaml +0 -0
  197. {etlplus-0.16.10 → etlplus-0.17.3}/examples/quickstart.py +0 -0
  198. {etlplus-0.16.10 → etlplus-0.17.3}/pytest.ini +0 -0
  199. {etlplus-0.16.10 → etlplus-0.17.3}/setup.cfg +0 -0
  200. {etlplus-0.16.10 → etlplus-0.17.3}/tests/README.md +0 -0
  201. {etlplus-0.16.10 → etlplus-0.17.3}/tests/__init__.py +0 -0
  202. {etlplus-0.16.10 → etlplus-0.17.3}/tests/conftest.py +0 -0
  203. {etlplus-0.16.10 → etlplus-0.17.3}/tests/integration/conftest.py +0 -0
  204. {etlplus-0.16.10 → etlplus-0.17.3}/tests/integration/test_i_cli.py +0 -0
  205. {etlplus-0.16.10 → etlplus-0.17.3}/tests/integration/test_i_config_load.py +0 -0
  206. {etlplus-0.16.10 → etlplus-0.17.3}/tests/integration/test_i_examples_data_parity.py +0 -0
  207. {etlplus-0.16.10 → etlplus-0.17.3}/tests/integration/test_i_pagination_strategy.py +0 -0
  208. {etlplus-0.16.10 → etlplus-0.17.3}/tests/integration/test_i_run.py +0 -0
  209. {etlplus-0.16.10 → etlplus-0.17.3}/tests/integration/test_i_run_profile_pagination_defaults.py +0 -0
  210. {etlplus-0.16.10 → etlplus-0.17.3}/tests/integration/test_i_run_profile_rate_limit_defaults.py +0 -0
  211. {etlplus-0.16.10 → etlplus-0.17.3}/tests/smoke/__init__.py +0 -0
  212. {etlplus-0.16.10 → etlplus-0.17.3}/tests/smoke/conftest.py +0 -0
  213. {etlplus-0.16.10 → etlplus-0.17.3}/tests/smoke/test_s_cli_check.py +0 -0
  214. {etlplus-0.16.10 → etlplus-0.17.3}/tests/smoke/test_s_cli_extract.py +0 -0
  215. {etlplus-0.16.10 → etlplus-0.17.3}/tests/smoke/test_s_cli_load.py +0 -0
  216. {etlplus-0.16.10 → etlplus-0.17.3}/tests/smoke/test_s_cli_render.py +0 -0
  217. {etlplus-0.16.10 → etlplus-0.17.3}/tests/smoke/test_s_cli_transform.py +0 -0
  218. {etlplus-0.16.10 → etlplus-0.17.3}/tests/smoke/test_s_cli_validate.py +0 -0
  219. {etlplus-0.16.10 → etlplus-0.17.3}/tests/smoke/test_s_pipeline.py +0 -0
  220. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/api/conftest.py +0 -0
  221. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/api/test_u_api_auth.py +0 -0
  222. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/api/test_u_api_config.py +0 -0
  223. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/api/test_u_api_endpoint_client.py +0 -0
  224. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/api/test_u_api_enums.py +0 -0
  225. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/api/test_u_api_mocks.py +0 -0
  226. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/api/test_u_api_pagination_client.py +0 -0
  227. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/api/test_u_api_pagination_config.py +0 -0
  228. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/api/test_u_api_paginator.py +0 -0
  229. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/api/test_u_api_rate_limit_config.py +0 -0
  230. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/api/test_u_api_rate_limiter.py +0 -0
  231. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/api/test_u_api_request_manager.py +0 -0
  232. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/api/test_u_api_retry_manager.py +0 -0
  233. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/api/test_u_api_transport.py +0 -0
  234. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/api/test_u_api_types.py +0 -0
  235. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/api/test_u_api_utils.py +0 -0
  236. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/cli/conftest.py +0 -0
  237. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/cli/test_u_cli_handlers.py +0 -0
  238. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/cli/test_u_cli_io.py +0 -0
  239. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/cli/test_u_cli_main.py +0 -0
  240. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/cli/test_u_cli_state.py +0 -0
  241. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/conftest.py +0 -0
  242. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/connector/test_u_connector_enums.py +0 -0
  243. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/connector/test_u_connector_utils.py +0 -0
  244. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/database/test_u_database_ddl.py +0 -0
  245. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/database/test_u_database_engine.py +0 -0
  246. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/database/test_u_database_orm.py +0 -0
  247. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/database/test_u_database_schema.py +0 -0
  248. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/file/test_u_file_enums.py +0 -0
  249. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/file/test_u_file_yaml.py +0 -0
  250. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/ops/test_u_ops_enums.py +0 -0
  251. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/ops/test_u_ops_load.py +0 -0
  252. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/ops/test_u_ops_run.py +0 -0
  253. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/ops/test_u_ops_transform.py +0 -0
  254. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/ops/test_u_ops_utils.py +0 -0
  255. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/ops/test_u_ops_validate.py +0 -0
  256. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/test_u_config.py +0 -0
  257. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/test_u_main.py +0 -0
  258. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/test_u_mixins.py +0 -0
  259. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/test_u_utils.py +0 -0
  260. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/test_u_version.py +0 -0
  261. {etlplus-0.16.10 → etlplus-0.17.3}/tests/unit/workflow/test_u_workflow_jobs.py +0 -0
  262. {etlplus-0.16.10 → etlplus-0.17.3}/tools/update_demo_snippets.py +0 -0
@@ -62,7 +62,11 @@ jobs:
62
62
  run: |
63
63
  ruff version
64
64
  ruff check .
65
- ruff format --check .
65
+ # ruff format --check .
66
+ files="$(git ls-files '*.py')"
67
+ if [ -n "$files" ]; then
68
+ autopep8 --diff --exit-code --max-line-length=79 $files
69
+ fi
66
70
 
67
71
  test:
68
72
  runs-on: ubuntu-latest
@@ -19,6 +19,10 @@ select = [
19
19
  "I", # isort
20
20
  "UP", # pyupgrade
21
21
  ]
22
+ preview = true
23
+ extend-select = [
24
+ "E203", # Enforce autopep8 slice spacing (no space before ':')
25
+ ]
22
26
  ignore = [
23
27
  # Allow module-level variable use for caches/helpers, if needed
24
28
  ]
@@ -172,6 +172,11 @@ dist: ## Build sdist and wheel into ./dist using pyproject.toml
172
172
  @$(PYTHON) -m twine check dist/*
173
173
  @$(call ECHO_OK,"Built and validated distribution artifacts in ./dist")
174
174
 
175
+ .PHONY: file
176
+ file: venv ## Install package + file extras
177
+ @$(PYTHON) -m pip install -e $(PKG_DIR)[file]
178
+ @$(call ECHO_OK,"Installed etlplus + file extras")
179
+
175
180
  .PHONY: fix
176
181
  fix: ## Auto-fix with ruff
177
182
  @$(VENV_BIN)/ruff check . --fix || (echo "Hint: run 'make dev' first" && false)
@@ -211,8 +216,11 @@ doclint: ## Run docstring linters (pydocstyle + pydoclint if available)
211
216
  .PHONY: fmt
212
217
  fmt: ## Format code with ruff (imports + fixes) and black
213
218
  @$(VENV_BIN)/ruff check . --fix || (echo "Hint: run 'make dev' first" && false)
214
- @$(VENV_BIN)/ruff format . || true
215
- @$(VENV_BIN)/black . || true
219
+ # @$(VENV_BIN)/ruff format . || true
220
+ # @$(VENV_BIN)/black . || true
221
+ @$(VENV_BIN)/autopep8 --in-place --max-line-length=79 \
222
+ --exclude .venv,dist,build,etlplus.egg-info,.mypy_cache,.pytest_cache \
223
+ $(shell git ls-files '*.py') || true
216
224
 
217
225
  .PHONY: run
218
226
  run: ## Run the etlplus CLI (dry-run) using $(ENV)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: etlplus
3
- Version: 0.16.10
3
+ Version: 0.17.3
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
@@ -32,6 +32,7 @@ Requires-Dist: typer>=0.21.0
32
32
  Requires-Dist: xlrd>=2.0.2
33
33
  Requires-Dist: xlwt>=1.3.0
34
34
  Provides-Extra: dev
35
+ Requires-Dist: autopep8>=2.3.2; extra == "dev"
35
36
  Requires-Dist: black>=25.9.0; extra == "dev"
36
37
  Requires-Dist: build>=1.2.2; extra == "dev"
37
38
  Requires-Dist: flake8>=7.3.0; extra == "dev"
@@ -44,6 +45,17 @@ Requires-Dist: ruff>=0.14.4; extra == "dev"
44
45
  Provides-Extra: docs
45
46
  Requires-Dist: sphinx>=4.0.0; extra == "docs"
46
47
  Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"
48
+ Provides-Extra: file
49
+ Requires-Dist: pymongo>=4.9.1; extra == "file"
50
+ Requires-Dist: cbor2>=5.6.4; extra == "file"
51
+ Requires-Dist: duckdb>=1.1.0; extra == "file"
52
+ Requires-Dist: msgpack>=1.0.8; extra == "file"
53
+ Requires-Dist: netCDF4>=1.7.2; extra == "file"
54
+ Requires-Dist: odfpy>=1.4.1; extra == "file"
55
+ Requires-Dist: pyreadr>=0.5.2; extra == "file"
56
+ Requires-Dist: pyreadstat>=1.3.3; extra == "file"
57
+ Requires-Dist: tomli-w>=1.2.0; extra == "file"
58
+ Requires-Dist: xarray>=2024.9.0; extra == "file"
47
59
  Dynamic: home-page
48
60
  Dynamic: license-file
49
61
  Dynamic: requires-python
@@ -176,6 +188,12 @@ For development:
176
188
  pip install -e ".[dev]"
177
189
  ```
178
190
 
191
+ For full file-format support (optional extras):
192
+
193
+ ```bash
194
+ pip install -e ".[file]"
195
+ ```
196
+
179
197
  ## Quickstart
180
198
 
181
199
  Get up and running in under a minute.
@@ -240,10 +258,10 @@ Recognized file formats are listed in the tables below. Support for reading to o
240
258
  | Format | Read | Write | Description |
241
259
  | --- | --- | --- | --- |
242
260
  | `csv` | Y | Y | Comma-Separated Values |
243
- | `dat` | N | N | Generic data file, often delimited or fixed-width |
244
- | `fwf` | N | N | Fixed-Width Fields |
245
- | `psv` | N | N | Pipe-Separated Values |
246
- | `tab` | N | N | Often synonymous with TSV |
261
+ | `dat` | Y | Y | Generic data file, often delimited or fixed-width |
262
+ | `fwf` | Y | Y | Fixed-Width Fields |
263
+ | `psv` | Y | Y | Pipe-Separated Values |
264
+ | `tab` | Y | Y | Often synonymous with TSV |
247
265
  | `tsv` | Y | Y | Tab-Separated Values |
248
266
  | `txt` | Y | Y | Plain text, often delimited or fixed-width |
249
267
 
@@ -253,11 +271,11 @@ Recognized file formats are listed in the tables below. Support for reading to o
253
271
  | --- | --- | --- | --- |
254
272
  | `cfg` | N | N | Config-style key-value pairs |
255
273
  | `conf` | N | N | Config-style key-value pairs |
256
- | `ini` | N | N | Config-style key-value pairs |
274
+ | `ini` | Y | Y | Config-style key-value pairs |
257
275
  | `json` | Y | Y | JavaScript Object Notation |
258
276
  | `ndjson` | Y | Y | Newline-Delimited JSON |
259
- | `properties` | N | N | Java-style key-value pairs |
260
- | `toml` | N | N | Tom's Obvious Minimal Language |
277
+ | `properties` | Y | Y | Java-style key-value pairs |
278
+ | `toml` | Y | Y | Tom's Obvious Minimal Language |
261
279
  | `xml` | Y | Y | Extensible Markup Language |
262
280
  | `yaml` | Y | Y | YAML Ain't Markup Language |
263
281
 
@@ -265,7 +283,7 @@ Recognized file formats are listed in the tables below. Support for reading to o
265
283
 
266
284
  | Format | Read | Write | Description |
267
285
  | --- | --- | --- | --- |
268
- | `arrow` | N | N | Apache Arrow IPC |
286
+ | `arrow` | Y | Y | Apache Arrow IPC |
269
287
  | `feather` | Y | Y | Apache Arrow Feather |
270
288
  | `orc` | Y | Y | Optimized Row Columnar; common in Hadoop |
271
289
  | `parquet` | Y | Y | Apache Parquet; common in Big Data |
@@ -275,48 +293,48 @@ Recognized file formats are listed in the tables below. Support for reading to o
275
293
  | Format | Read | Write | Description |
276
294
  | --- | --- | --- | --- |
277
295
  | `avro` | Y | Y | Apache Avro |
278
- | `bson` | N | N | Binary JSON; common with MongoDB exports/dumps |
279
- | `cbor` | N | N | Concise Binary Object Representation |
296
+ | `bson` | Y | Y | Binary JSON; common with MongoDB exports/dumps |
297
+ | `cbor` | Y | Y | Concise Binary Object Representation |
280
298
  | `ion` | N | N | Amazon Ion |
281
- | `msgpack` | N | N | MessagePack |
282
- | `pb` | N | N | Protocol Buffers (Google Protobuf) |
299
+ | `msgpack` | Y | Y | MessagePack |
300
+ | `pb` | Y | Y | Protocol Buffers (Google Protobuf) |
283
301
  | `pbf` | N | N | Protocolbuffer Binary Format; often for GIS data |
284
- | `proto` | N | N | Protocol Buffers schema; often in .pb / .bin |
302
+ | `proto` | Y | Y | Protocol Buffers schema; often in .pb / .bin |
285
303
 
286
304
  #### Databases and Embedded Storage
287
305
 
288
306
  | Format | Read | Write | Description |
289
307
  | --- | --- | --- | --- |
290
308
  | `accdb` | N | N | Microsoft Access (newer format) |
291
- | `duckdb` | N | N | DuckDB |
309
+ | `duckdb` | Y | Y | DuckDB |
292
310
  | `mdb` | N | N | Microsoft Access (older format) |
293
- | `sqlite` | N | N | SQLite |
311
+ | `sqlite` | Y | Y | SQLite |
294
312
 
295
313
  #### Spreadsheets
296
314
 
297
315
  | Format | Read | Write | Description |
298
316
  | --- | --- | --- | --- |
299
317
  | `numbers` | N | N | Apple Numbers |
300
- | `ods` | N | N | OpenDocument |
318
+ | `ods` | Y | Y | OpenDocument |
301
319
  | `wks` | N | N | Lotus 1-2-3 |
302
320
  | `xls` | Y | N | Microsoft Excel (BIFF; read-only) |
303
- | `xlsm` | N | N | Microsoft Excel Macro-Enabled (Open XML) |
321
+ | `xlsm` | Y | Y | Microsoft Excel Macro-Enabled (Open XML) |
304
322
  | `xlsx` | Y | Y | Microsoft Excel (Open XML) |
305
323
 
306
324
  #### Statistical / Scientific / Numeric Computing
307
325
 
308
326
  | Format | Read | Write | Description |
309
327
  | --- | --- | --- | --- |
310
- | `dta` | N | N | Stata |
311
- | `hdf5` | N | N | Hierarchical Data Format |
328
+ | `dta` | Y | Y | Stata |
329
+ | `hdf5` | Y | N | Hierarchical Data Format |
312
330
  | `mat` | N | N | MATLAB |
313
- | `nc` | N | N | NetCDF |
314
- | `rda` | N | N | RData workspace/object |
315
- | `rds` | N | N | R data |
316
- | `sas7bdat` | N | N | SAS data |
317
- | `sav` | N | N | SPSS data |
331
+ | `nc` | Y | Y | NetCDF |
332
+ | `rda` | Y | Y | RData workspace/object |
333
+ | `rds` | Y | Y | R data |
334
+ | `sas7bdat` | Y | N | SAS data |
335
+ | `sav` | Y | Y | SPSS data |
318
336
  | `sylk` | N | N | Symbolic Link |
319
- | `xpt` | N | N | SAS Transport |
337
+ | `xpt` | Y | Y | SAS Transport |
320
338
  | `zsav` | N | N | Compressed SPSS data |
321
339
 
322
340
  #### Logs and Event Streams
@@ -126,6 +126,12 @@ For development:
126
126
  pip install -e ".[dev]"
127
127
  ```
128
128
 
129
+ For full file-format support (optional extras):
130
+
131
+ ```bash
132
+ pip install -e ".[file]"
133
+ ```
134
+
129
135
  ## Quickstart
130
136
 
131
137
  Get up and running in under a minute.
@@ -190,10 +196,10 @@ Recognized file formats are listed in the tables below. Support for reading to o
190
196
  | Format | Read | Write | Description |
191
197
  | --- | --- | --- | --- |
192
198
  | `csv` | Y | Y | Comma-Separated Values |
193
- | `dat` | N | N | Generic data file, often delimited or fixed-width |
194
- | `fwf` | N | N | Fixed-Width Fields |
195
- | `psv` | N | N | Pipe-Separated Values |
196
- | `tab` | N | N | Often synonymous with TSV |
199
+ | `dat` | Y | Y | Generic data file, often delimited or fixed-width |
200
+ | `fwf` | Y | Y | Fixed-Width Fields |
201
+ | `psv` | Y | Y | Pipe-Separated Values |
202
+ | `tab` | Y | Y | Often synonymous with TSV |
197
203
  | `tsv` | Y | Y | Tab-Separated Values |
198
204
  | `txt` | Y | Y | Plain text, often delimited or fixed-width |
199
205
 
@@ -203,11 +209,11 @@ Recognized file formats are listed in the tables below. Support for reading to o
203
209
  | --- | --- | --- | --- |
204
210
  | `cfg` | N | N | Config-style key-value pairs |
205
211
  | `conf` | N | N | Config-style key-value pairs |
206
- | `ini` | N | N | Config-style key-value pairs |
212
+ | `ini` | Y | Y | Config-style key-value pairs |
207
213
  | `json` | Y | Y | JavaScript Object Notation |
208
214
  | `ndjson` | Y | Y | Newline-Delimited JSON |
209
- | `properties` | N | N | Java-style key-value pairs |
210
- | `toml` | N | N | Tom's Obvious Minimal Language |
215
+ | `properties` | Y | Y | Java-style key-value pairs |
216
+ | `toml` | Y | Y | Tom's Obvious Minimal Language |
211
217
  | `xml` | Y | Y | Extensible Markup Language |
212
218
  | `yaml` | Y | Y | YAML Ain't Markup Language |
213
219
 
@@ -215,7 +221,7 @@ Recognized file formats are listed in the tables below. Support for reading to o
215
221
 
216
222
  | Format | Read | Write | Description |
217
223
  | --- | --- | --- | --- |
218
- | `arrow` | N | N | Apache Arrow IPC |
224
+ | `arrow` | Y | Y | Apache Arrow IPC |
219
225
  | `feather` | Y | Y | Apache Arrow Feather |
220
226
  | `orc` | Y | Y | Optimized Row Columnar; common in Hadoop |
221
227
  | `parquet` | Y | Y | Apache Parquet; common in Big Data |
@@ -225,48 +231,48 @@ Recognized file formats are listed in the tables below. Support for reading to o
225
231
  | Format | Read | Write | Description |
226
232
  | --- | --- | --- | --- |
227
233
  | `avro` | Y | Y | Apache Avro |
228
- | `bson` | N | N | Binary JSON; common with MongoDB exports/dumps |
229
- | `cbor` | N | N | Concise Binary Object Representation |
234
+ | `bson` | Y | Y | Binary JSON; common with MongoDB exports/dumps |
235
+ | `cbor` | Y | Y | Concise Binary Object Representation |
230
236
  | `ion` | N | N | Amazon Ion |
231
- | `msgpack` | N | N | MessagePack |
232
- | `pb` | N | N | Protocol Buffers (Google Protobuf) |
237
+ | `msgpack` | Y | Y | MessagePack |
238
+ | `pb` | Y | Y | Protocol Buffers (Google Protobuf) |
233
239
  | `pbf` | N | N | Protocolbuffer Binary Format; often for GIS data |
234
- | `proto` | N | N | Protocol Buffers schema; often in .pb / .bin |
240
+ | `proto` | Y | Y | Protocol Buffers schema; often in .pb / .bin |
235
241
 
236
242
  #### Databases and Embedded Storage
237
243
 
238
244
  | Format | Read | Write | Description |
239
245
  | --- | --- | --- | --- |
240
246
  | `accdb` | N | N | Microsoft Access (newer format) |
241
- | `duckdb` | N | N | DuckDB |
247
+ | `duckdb` | Y | Y | DuckDB |
242
248
  | `mdb` | N | N | Microsoft Access (older format) |
243
- | `sqlite` | N | N | SQLite |
249
+ | `sqlite` | Y | Y | SQLite |
244
250
 
245
251
  #### Spreadsheets
246
252
 
247
253
  | Format | Read | Write | Description |
248
254
  | --- | --- | --- | --- |
249
255
  | `numbers` | N | N | Apple Numbers |
250
- | `ods` | N | N | OpenDocument |
256
+ | `ods` | Y | Y | OpenDocument |
251
257
  | `wks` | N | N | Lotus 1-2-3 |
252
258
  | `xls` | Y | N | Microsoft Excel (BIFF; read-only) |
253
- | `xlsm` | N | N | Microsoft Excel Macro-Enabled (Open XML) |
259
+ | `xlsm` | Y | Y | Microsoft Excel Macro-Enabled (Open XML) |
254
260
  | `xlsx` | Y | Y | Microsoft Excel (Open XML) |
255
261
 
256
262
  #### Statistical / Scientific / Numeric Computing
257
263
 
258
264
  | Format | Read | Write | Description |
259
265
  | --- | --- | --- | --- |
260
- | `dta` | N | N | Stata |
261
- | `hdf5` | N | N | Hierarchical Data Format |
266
+ | `dta` | Y | Y | Stata |
267
+ | `hdf5` | Y | N | Hierarchical Data Format |
262
268
  | `mat` | N | N | MATLAB |
263
- | `nc` | N | N | NetCDF |
264
- | `rda` | N | N | RData workspace/object |
265
- | `rds` | N | N | R data |
266
- | `sas7bdat` | N | N | SAS data |
267
- | `sav` | N | N | SPSS data |
269
+ | `nc` | Y | Y | NetCDF |
270
+ | `rda` | Y | Y | RData workspace/object |
271
+ | `rds` | Y | Y | R data |
272
+ | `sas7bdat` | Y | N | SAS data |
273
+ | `sav` | Y | Y | SPSS data |
268
274
  | `sylk` | N | N | Symbolic Link |
269
- | `xpt` | N | N | SAS Transport |
275
+ | `xpt` | Y | Y | SAS Transport |
270
276
  | `zsav` | N | N | Compressed SPSS data |
271
277
 
272
278
  #### Logs and Event Streams
@@ -9,6 +9,12 @@ and writing data files.
9
9
  types
10
10
  - Exposes a `File` class with instance methods for reading and writing data
11
11
 
12
+ Some formats require optional dependencies. Install with:
13
+
14
+ ```bash
15
+ pip install -e ".[file]"
16
+ ```
17
+
12
18
  Back to project overview: see the top-level [README](../../README.md).
13
19
 
14
20
  - [`etlplus.file` Subpackage](#etlplusfile-subpackage)
@@ -29,21 +35,48 @@ matrix across all `FileFormat` values, see the top-level [README](../../README.m
29
35
  | Format | Description |
30
36
  |-----------|---------------------------------------------|
31
37
  | avro | Apache Avro binary serialization |
38
+ | arrow | Apache Arrow IPC |
39
+ | bson | Binary JSON (BSON) |
40
+ | cbor | Concise Binary Object Representation |
32
41
  | csv | Comma-separated values text files |
42
+ | dat | Generic data files (delimited) |
43
+ | dta | Stata datasets |
44
+ | duckdb | DuckDB database file |
33
45
  | feather | Apache Arrow Feather columnar format |
46
+ | fwf | Fixed-width formatted text files |
34
47
  | gz | Gzip-compressed files (see Compression) |
48
+ | hdf5 | Hierarchical Data Format |
49
+ | ini | INI config files |
35
50
  | json | Standard JSON files |
51
+ | msgpack | MessagePack binary serialization |
52
+ | nc | NetCDF datasets |
36
53
  | ndjson | Newline-delimited JSON (JSON Lines) |
54
+ | ods | OpenDocument spreadsheets |
37
55
  | orc | Apache ORC columnar format |
38
56
  | parquet | Apache Parquet columnar format |
57
+ | pb | Protocol Buffers binary |
58
+ | properties | Java-style properties |
59
+ | proto | Protocol Buffers schema |
60
+ | psv | Pipe-separated values text files |
61
+ | rda | RData workspace bundles |
62
+ | rds | RDS datasets |
63
+ | sas7bdat | SAS datasets |
64
+ | sav | SPSS datasets |
65
+ | sqlite | SQLite database file |
66
+ | tab | Tab-delimited text files |
67
+ | toml | TOML config files |
39
68
  | tsv | Tab-separated values text files |
40
69
  | txt | Plain text files |
41
70
  | xls | Microsoft Excel (legacy .xls; read-only) |
71
+ | xlsm | Microsoft Excel Macro-Enabled (XLSM) |
42
72
  | xlsx | Microsoft Excel (modern .xlsx) |
73
+ | xpt | SAS transport files |
43
74
  | zip | ZIP-compressed files (see Compression) |
44
75
  | xml | XML files |
45
76
  | yaml | YAML files |
46
77
 
78
+ Note: HDF5 support is read-only; writing is currently disabled.
79
+
47
80
  Compression formats (gz, zip) are also supported as wrappers for other formats. Formats not listed
48
81
  here are currently stubbed and will raise `NotImplementedError` on read/write.
49
82
 
@@ -22,6 +22,7 @@ _MODULE_CACHE: dict[str, Any] = {}
22
22
  def _error_message(
23
23
  module_name: str,
24
24
  format_name: str,
25
+ pip_name: str | None = None,
25
26
  ) -> str:
26
27
  """
27
28
  Build an import error message for an optional dependency.
@@ -32,16 +33,19 @@ def _error_message(
32
33
  Module name to look up.
33
34
  format_name : str
34
35
  Human-readable format name for templated messages.
36
+ pip_name : str | None, optional
37
+ Package name to suggest for installation. Defaults to *module_name*.
35
38
 
36
39
  Returns
37
40
  -------
38
41
  str
39
42
  Formatted error message.
40
43
  """
44
+ install_name = pip_name or module_name
41
45
  return (
42
46
  f'{format_name} support requires '
43
- f'optional dependency "{module_name}".\n'
44
- f'Install with: pip install {module_name}'
47
+ f'optional dependency "{install_name}".\n'
48
+ f'Install with: pip install {install_name}'
45
49
  )
46
50
 
47
51
 
@@ -84,19 +88,36 @@ def get_optional_module(
84
88
  return module
85
89
 
86
90
 
87
- def get_fastavro() -> Any:
91
+ def get_dependency(
92
+ module_name: str,
93
+ *,
94
+ format_name: str,
95
+ pip_name: str | None = None,
96
+ ) -> Any:
88
97
  """
89
- Return the fastavro module, importing it on first use.
98
+ Return an optional dependency module with a standardized error message.
90
99
 
91
- Raises an informative ImportError if the optional dependency is missing.
100
+ Parameters
101
+ ----------
102
+ module_name : str
103
+ Name of the module to import.
104
+ format_name : str
105
+ Human-readable format name for error messages.
106
+ pip_name : str | None, optional
107
+ Package name to suggest for installation (defaults to *module_name*).
92
108
 
93
- Notes
94
- -----
95
- Prefer :func:`get_optional_module` for new call sites.
109
+ Returns
110
+ -------
111
+ Any
112
+ The imported module.
96
113
  """
97
114
  return get_optional_module(
98
- 'fastavro',
99
- error_message=_error_message('fastavro', format_name='AVRO'),
115
+ module_name,
116
+ error_message=_error_message(
117
+ module_name,
118
+ format_name=format_name,
119
+ pip_name=pip_name,
120
+ ),
100
121
  )
101
122
 
102
123
 
@@ -118,12 +139,9 @@ def get_pandas(
118
139
 
119
140
  Notes
120
141
  -----
121
- Prefer :func:`get_optional_module` for new call sites.
142
+ Prefer :func:`get_dependency` for new call sites.
122
143
  """
123
- return get_optional_module(
124
- 'pandas',
125
- error_message=_error_message('pandas', format_name=format_name),
126
- )
144
+ return get_dependency('pandas', format_name=format_name)
127
145
 
128
146
 
129
147
  def get_yaml() -> Any:
@@ -134,9 +152,6 @@ def get_yaml() -> Any:
134
152
 
135
153
  Notes
136
154
  -----
137
- Prefer :func:`get_optional_module` for new call sites.
155
+ Prefer :func:`get_dependency` for new call sites.
138
156
  """
139
- return get_optional_module(
140
- 'yaml',
141
- error_message=_error_message('PyYAML', format_name='YAML'),
142
- )
157
+ return get_dependency('yaml', format_name='YAML', pip_name='PyYAML')