Skip to main content

# core-etl

This library provides essential components for ETL processes, offering reusable interfaces for seamless data extraction, transformation, and loading….


PyPI Downloads Python Versions License Pipeline Status Docs Status Security

Installation

Install from PyPI using pip:

pip install core-etl
uv pip install core-etl  # Or using UV...

Features

Base ETL Framework

  • Template method pattern for ETL workflow orchestration

  • Comprehensive lifecycle hooks (pre-processing, execution, post-processing, cleanup)

  • Built-in error handling with detailed exception logging

  • Task status tracking (CREATED, EXECUTING, SUCCESS, ERROR)

  • Timezone support for date/datetime processing (defaults to UTC)

  • Temporary folder management for local file operations

  • Extensible resource cleanup mechanisms

File-Based ETL (IBaseEtlFromFile)

  • Process files from various sources (SFTP, local filesystem, cloud storage)

  • Iterator-based file processing with error isolation per file

  • Individual file success/error callbacks for custom handling

  • Batch file operations with automatic error recovery

  • Extensible hooks: get_paths(), process_file(), on_success(), on_error()

Record-Based ETL (IBaseEtlFromRecord)

  • Process records from APIs, databases, files, message queues, and data streams

  • Memory-efficient batch processing with configurable batch sizes

  • Built-in transformation pipeline:

    • Field removal (attrs_to_remove)

    • Field renaming (name_mapper)

    • Data type casting (type_mapper)

  • Pre and post transformation hooks for custom business logic

  • Incremental processing support with last_processed markers

  • Extensible methods: retrieve_records(), process_records(), pre_transformations(), post_transformations()

Async ETL (IAsyncETL)

  • Concurrent record processing via asyncio producer/consumer pattern

  • Configurable worker pool size (max_workers) and queue capacity (max_queue_size)

  • Individual record failures are isolated, failed records are logged and skipped without aborting the pipeline

  • Extensible methods: produce_records(), _process_record()

  • Note: execute() uses asyncio.run() internally; call await asyncio.to_thread(task.execute) from async contexts

Quick Start

Installation

Install the package:

pip install core-etl
uv pip install core-etl     # Or using UV...
pip install -e ".[dev]"     # For development...

Setting Up Environment

  1. Install required libraries:

pip install --upgrade pip
pip install virtualenv
  1. Create Python virtual environment:

virtualenv --python=python3.12 .venv
  1. Activate the virtual environment:

source .venv/bin/activate

Install packages

pip install .
pip install -e ".[dev]"

Check tests and coverage

python manager.py run-tests
python manager.py run-coverage

Contributing

Contributions are welcome! Please:

  1. Fork the repository

  2. Create a feature branch

  3. Write tests for new functionality

  4. Ensure all tests pass: pytest -n auto

  5. Run linting: pylint core_etl

  6. Run security checks: bandit -r core_etl

  7. Submit a pull request

License

This project is licensed under the MIT License. See the LICENSE file for details.

Support

For questions or support, please open an issue on GitLab or contact the maintainers.

Authors

Metadata

Release files for core-etl 3.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for core-etl 3.2.2
File Size Uploaded
core_etl-3.2.2.tar.gz 13.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for core-etl 3.2.2
File Interpreter ABI Platform
core_etl-3.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 26.4 kB

Release files / core_etl-3.2.2.tar.gz

Download URL core_etl-3.2.2.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
355dbf33a25bdc94fe676d40cfed75191f92ca113f8568a22a05c64f2dc25ddd
BLAKE2b-256 checksum
How to use checksums
c38535e904a65ca3f8648debfda27fb666ce99b7579da1a9b5b416cbb6dadb61
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / core_etl-3.2.2-py3-none-any.whl

Download URL core_etl-3.2.2-py3-none-any.whl
Size 13.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2722ce3465543da2adc9773ab283a038909f796c09ebd22705c3f2f893cde7f4
BLAKE2b-256 checksum
How to use checksums
52ac5a0d4a116a093d4afc9de18590b30b2888375767fdba0018fefb08cc10af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

This release

3.2.2 This release

2 release files

3.2.1

2 release files

3.2.0

2 release files

3.1.3

2 release files

3.1.2

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.0.0

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.4

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page