easy-data-loader 0.2.1__tar.gz → 0.2.2__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 (41) hide show
  1. {easy_data_loader-0.2.1/src/easy_data_loader.egg-info → easy_data_loader-0.2.2}/PKG-INFO +3 -1
  2. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/README.md +2 -0
  3. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/pyproject.toml +12 -2
  4. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader/cli.py +11 -10
  5. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader/data_inferrence.py +2 -2
  6. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader/log.py +2 -1
  7. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader/pipeline.py +9 -5
  8. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2/src/easy_data_loader.egg-info}/PKG-INFO +3 -1
  9. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/LICENSE +0 -0
  10. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/setup.cfg +0 -0
  11. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader/__init__.py +0 -0
  12. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader/config_loader.py +0 -0
  13. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader/custom_exceptions.py +0 -0
  14. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader/database_connector.py +0 -0
  15. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader/database_operations.py +0 -0
  16. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader/driver_detector.py +0 -0
  17. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader/file_operations.py +0 -0
  18. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader/models.py +0 -0
  19. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader/orchestrator.py +0 -0
  20. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader/pipeline_base.py +0 -0
  21. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader/procedure_pipeline.py +0 -0
  22. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader/resource_access.py +0 -0
  23. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader/utils.py +0 -0
  24. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader.egg-info/SOURCES.txt +0 -0
  25. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader.egg-info/dependency_links.txt +0 -0
  26. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader.egg-info/entry_points.txt +0 -0
  27. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader.egg-info/requires.txt +0 -0
  28. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/src/easy_data_loader.egg-info/top_level.txt +0 -0
  29. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/tests/test_cli.py +0 -0
  30. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/tests/test_config_loader.py +0 -0
  31. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/tests/test_data_inference.py +0 -0
  32. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/tests/test_database_connector.py +0 -0
  33. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/tests/test_file_operations.py +0 -0
  34. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/tests/test_imports.py +0 -0
  35. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/tests/test_models.py +0 -0
  36. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/tests/test_orchestrator.py +0 -0
  37. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/tests/test_pipeline_transform_order.py +0 -0
  38. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/tests/test_procedure_execution_mode.py +0 -0
  39. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/tests/test_resource_access.py +0 -0
  40. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/tests/test_source_file_delete.py +0 -0
  41. {easy_data_loader-0.2.1 → easy_data_loader-0.2.2}/tests/test_validation.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: easy_data_loader
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Data transfer utilities between files and databases
5
5
  Author-email: Bojoi Gabriel <bojoigabriel@gmail.com>
6
6
  Classifier: Development Status :: 3 - Alpha
@@ -36,6 +36,8 @@ Dynamic: license-file
36
36
 
37
37
  **Easy Data Loader** is a flexible, modular Python library designed to streamline ETL (Extract, Transform, Load) processes between various file data sources (csv, xlsx, parquet, orc) and databases (MSSQL, PostgreSQL and others).
38
38
 
39
+ The [documentation guide](docs/README.md) is the canonical onboarding path. It is also the source for the self-paced presentation outline in [docs/presentation-outline.md](docs/presentation-outline.md).
40
+
39
41
  ## ✨ Key Features
40
42
  - **Declarative Configuration**: Manage connections and pipelines through simple python files and `.env` resources.
41
43
  - **Integrated CLI**: Initialize a standardized project structure with a single command.
@@ -7,6 +7,8 @@
7
7
 
8
8
  **Easy Data Loader** is a flexible, modular Python library designed to streamline ETL (Extract, Transform, Load) processes between various file data sources (csv, xlsx, parquet, orc) and databases (MSSQL, PostgreSQL and others).
9
9
 
10
+ The [documentation guide](docs/README.md) is the canonical onboarding path. It is also the source for the self-paced presentation outline in [docs/presentation-outline.md](docs/presentation-outline.md).
11
+
10
12
  ## ✨ Key Features
11
13
  - **Declarative Configuration**: Manage connections and pipelines through simple python files and `.env` resources.
12
14
  - **Integrated CLI**: Initialize a standardized project structure with a single command.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "easy_data_loader"
3
- version = "0.2.1"
3
+ version = "0.2.2"
4
4
  description = "Data transfer utilities between files and databases"
5
5
  authors = [{ name = "Bojoi Gabriel", email = "bojoigabriel@gmail.com" }]
6
6
  readme = "README.md"
@@ -30,7 +30,14 @@ classifiers = [
30
30
  ]
31
31
 
32
32
  [dependency-groups]
33
- dev = ["ipykernel>=7.1.0", "pytest>=8.4.2", "ruff", "mypy", "pre-commit"]
33
+ dev = [
34
+ "ipykernel>=7.1.0",
35
+ "mypy",
36
+ "pre-commit",
37
+ "pytest>=8.4.2",
38
+ "python-pptx>=1.0.2",
39
+ "ruff",
40
+ ]
34
41
 
35
42
  [project.scripts]
36
43
  easy-data-loader = "easy_data_loader.cli:main"
@@ -38,6 +45,9 @@ easy-data-loader = "easy_data_loader.cli:main"
38
45
  [tool.setuptools.packages.find]
39
46
  where = ["src"]
40
47
 
48
+ [tool.setuptools.package-data]
49
+ "*" = ["*"]
50
+
41
51
  [tool.pytest.ini_options]
42
52
  pythonpath = "src"
43
53
 
@@ -6,6 +6,7 @@ from .utils import to_snake_case
6
6
  # Integrated templates
7
7
  PIPELINE_TEMPLATE = """from easy_data_loader.models import BasePipelineDefinition, ColumnDefinition
8
8
  import pandas as pd
9
+ from sqlalchemy import DateTime, Integer, Numeric, String
9
10
 
10
11
 
11
12
  example_pipeline = BasePipelineDefinition(
@@ -28,13 +29,13 @@ example_pipeline = BasePipelineDefinition(
28
29
 
29
30
  # columns definition if we are sending data to a database table
30
31
  columns={
31
- "transaction_id": ColumnDefinition(target_name="new_transaction_id", data_type=INT()),
32
- "date": ColumnDefinition(target_name="sales_date", data_type=DATETIME()),
33
- "customer_id": ColumnDefinition(target_name="id_customer", data_type=INT()),
34
- "product_category" : ColumnDefinition(target_name="category_of_product", data_type=NVARCHAR(100)),
35
- "units_sold" : ColumnDefinition(target_name="units", data_type=INT()),
36
- "unit_price" : ColumnDefinition(target_name="price", data_type=DECIMAL(6,2)),
37
- "raw_notes" : ColumnDefinition(target_name="notes", data_type=NVARCHAR(100))
32
+ "transaction_id": ColumnDefinition(target_name="new_transaction_id", data_type=Integer()),
33
+ "date": ColumnDefinition(target_name="sales_date", data_type=DateTime()),
34
+ "customer_id": ColumnDefinition(target_name="id_customer", data_type=Integer()),
35
+ "product_category" : ColumnDefinition(target_name="category_of_product", data_type=String(100)),
36
+ "units_sold" : ColumnDefinition(target_name="units", data_type=Integer()),
37
+ "unit_price" : ColumnDefinition(target_name="price", data_type=Numeric(6,2)),
38
+ "raw_notes" : ColumnDefinition(target_name="notes", data_type=String(100))
38
39
  },
39
40
 
40
41
  # different parameters passed to the write functions to be forwarded to the pandas function that will write to destination (e.g. to_sql, to_csv, to_excel, etc.)
@@ -118,14 +119,14 @@ MAIN = """from easy_data_loader import LoadPipeline, OrchestratorPipeline, Proce
118
119
 
119
120
  def main():
120
121
  # Run an ETL pipeline
121
- first_step = LoadPipeline(pipeline_name="example_pipeline").run()
122
+ first_step = LoadPipeline(file_name="example_pipeline").run()
122
123
 
123
124
  # Run a procedure pipeline
124
125
  if first_step:
125
- ProcedurePipeline(pipeline_name="example_procedure").run()
126
+ ProcedurePipeline(file_name="example_procedure").run()
126
127
 
127
128
  # Run an orchestrator pipeline
128
- OrchestratorPipeline(pipeline_name="example_orchestrator").run()
129
+ OrchestratorPipeline(file_name="example_orchestrator").run()
129
130
 
130
131
  if __name__ == "__main__":
131
132
  main()
@@ -100,7 +100,7 @@ class SQLAlchemyDTypeInferrer(LoggedComponent):
100
100
  )
101
101
  return {}
102
102
 
103
- self.logger.info(f"Dtype inference completed for {len(dtype_dict)} columns")
103
+ self.logger.info(f"Type inference completed for {len(dtype_dict)} columns")
104
104
 
105
105
  # Only visible in the file log, since it's logged at debug level
106
106
  self._log_inference_summary(dtype_dict)
@@ -110,7 +110,7 @@ class SQLAlchemyDTypeInferrer(LoggedComponent):
110
110
  except Exception as e:
111
111
  # Catch-all for any unexpected errors
112
112
  self.logger.error(
113
- f"Dtype inference failed completely: {str(e)}. "
113
+ f"Type inference failed completely: {str(e)}. "
114
114
  f"Returning empty dict - will use default inference.",
115
115
  exc_info=True,
116
116
  )
@@ -27,7 +27,8 @@ class AppLogger:
27
27
  )
28
28
 
29
29
  console_formatter = logging.Formatter(
30
- "[%(asctime)s]-[%(levelname)s] %(message)s"
30
+ "[%(asctime)s]-[%(levelname)s] %(message)s",
31
+ datefmt="%Y-%m-%d %H:%M:%S",
31
32
  )
32
33
 
33
34
  root_logger = logging.getLogger()
@@ -142,15 +142,17 @@ class LoadPipeline(BasePipeline):
142
142
  except PipelineValidationError as e:
143
143
  self.error_details = str(e)
144
144
  self.logger.error(
145
- f"Critical pipeline error - {self.definition.pipeline_name}: {str(e)}"
145
+ f"Critical pipeline error - {self.definition.pipeline_name}"
146
146
  )
147
+ self.logger.debug(str(e))
147
148
  self._log_audit("FAILED")
148
149
  raise
149
150
  except Exception as e:
150
151
  self.error_details = str(e)
151
- self.log_exception(
152
- e, f"Critical pipeline error - {self.definition.pipeline_name}"
152
+ self.logger.error(
153
+ f"Critical pipeline error - {self.definition.pipeline_name}"
153
154
  )
155
+ self.logger.debug(str(e))
154
156
  self._log_audit("FAILED")
155
157
  raise
156
158
  finally:
@@ -218,8 +220,10 @@ class LoadPipeline(BasePipeline):
218
220
 
219
221
  self.logger.error("No valid source configured for the Pipeline")
220
222
 
221
- except Exception as e:
222
- self.log_exception(e, "Extraction step failed")
223
+ except Exception:
224
+ self.error_details = "Extraction step failed"
225
+ self.logger.error(self.error_details)
226
+ self._log_audit("FAILED")
223
227
  raise
224
228
 
225
229
  return pd.DataFrame(), {}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: easy_data_loader
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Data transfer utilities between files and databases
5
5
  Author-email: Bojoi Gabriel <bojoigabriel@gmail.com>
6
6
  Classifier: Development Status :: 3 - Alpha
@@ -36,6 +36,8 @@ Dynamic: license-file
36
36
 
37
37
  **Easy Data Loader** is a flexible, modular Python library designed to streamline ETL (Extract, Transform, Load) processes between various file data sources (csv, xlsx, parquet, orc) and databases (MSSQL, PostgreSQL and others).
38
38
 
39
+ The [documentation guide](docs/README.md) is the canonical onboarding path. It is also the source for the self-paced presentation outline in [docs/presentation-outline.md](docs/presentation-outline.md).
40
+
39
41
  ## ✨ Key Features
40
42
  - **Declarative Configuration**: Manage connections and pipelines through simple python files and `.env` resources.
41
43
  - **Integrated CLI**: Initialize a standardized project structure with a single command.