Skip to main content

Package for creating ETL environments for data analysis

Reason this release was yanked:

deprecated

Project description

Fragua

Fragua is a lightweight and modular library designed to build ETL/ELT pipelines and data processing workflows in Python. It provides reusable components such as environments, agents, styles, parameters, and storages to orchestrate data extraction, transformation, and loading with traceability and best practices.


What is Fragua?

Fragua provides an abstraction layer for data integration tasks based on three main agents:

  • Extractor: retrieves data from different sources such as Excel, CSV, or APIs.
  • Transformer: transforms or enriches data by applying rules or models.
  • Loader: saves or delivers results to final destinations such as files or databases.

In addition to the agents, Fragua introduces the concept of Environments, which act as isolated workspaces that organize and group all components involved in a pipeline. An Environment manages:

  • Registered agents and their lifecycle.
  • Registries for styles, functions, and params.
  • A dedicated Warehouse for storing intermediate or final artifacts.
  • Execution settings, logging configuration, and context boundaries.

This design allows you to run multiple pipelines independently, each with its own configuration, state, and stored data.

Fragua also includes a storage system with:

  • Warehouse and WarehouseManager to store intermediate artifacts with metadata and traceability.
  • A modular architecture where styles, functions, and params can be registered within an Environment.

Key Features

  • Environment modeling (Environment) to isolate and organize working instances.
  • Agents (Extractor, Transformer, Loader) with a common pipeline, undo capability, and operation logging.
  • Registries for params, functions, and styles.
  • Storage types (Storage, Box, Container) and a centralized Warehouse.
  • Built-in utilities for logging, metrics, and execution state summaries.

Project Structure

fragua/
├── core/
├── environments/
├── extract/
├── load/
├── transform/
├── utils/
└── __init__.py

Installation

Install Fragua in editable mode from the root of the repository:

python -m pip install -e .

Check requirements.txt for additional dependencies.


Usage Example

import fragua as fg
from pathlib import Path

BASE_DIR = Path(__file__).parent
INPUT_XLSX = BASE_DIR / "test_files" / "input_files" / "test_data.xlsx"
OUTPUT_XLSX = BASE_DIR / "test_files" / "output_files"

env = fg.create_fragua("fragua_1", "minimal", True)
env.create_extractor("extractor")
env.create_transformer("transformer")
env.create_loader("loader")

extractor = env.get_agent("extractor")
transformer = env.get_agent("transformer")
loader = env.get_agent("loader")

extractor.work(
    "excel",
    save_as="extracted_data",
    path="./test_files/input_files/test_data.xlsx",
    sheet_name=0,
)

transformer.work(
    style="report",
    apply_to="extracted_data",
    save_as="transformed_data",
)

loader.work(
    style="excel",
    apply_to=["extracted_data", "transformed_data"],
    destination="./test_files/output_files",
    file_name="output_file",
)

Author

Santiago Lanz
📍 Developer and creator of Fragua
🌐 Portfolio: https://sagodev.github.io/Portfolio-Web-Santiago-Lanz/\ 💼 LinkedIn: https://www.linkedin.com/in/santiagolanz/\ 🐙 GitHub: https://github.com/SagoDev


⚖️ License

This project is distributed under the MIT license.
See the LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fragua-0.4.0.tar.gz (35.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fragua-0.4.0-py3-none-any.whl (54.1 kB view details)

Uploaded Python 3

File details

Details for the file fragua-0.4.0.tar.gz.

File metadata

  • Download URL: fragua-0.4.0.tar.gz
  • Upload date:
  • Size: 35.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for fragua-0.4.0.tar.gz
Algorithm Hash digest
SHA256 460d83dbde949d57644ac7cab35acddc7c42157d6221a3f5e82a20b2e5a9f0bd
MD5 c88ff560ae4a1acbaa293bc723ad8fe1
BLAKE2b-256 7d5d597958ad7f3f78b5662c01e93286ccd8ce77cb3ea0e9264b02a76bcb4442

See more details on using hashes here.

File details

Details for the file fragua-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: fragua-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 54.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for fragua-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 781bcf797619821d9182ec8b551bb5f1fb912530e4be80f8127cf3bc78da3b62
MD5 ab7cface4b1639ff580f8559829ad2a9
BLAKE2b-256 c319c1dbd5af18575c16c53d7306719a558368e75ffb17487ebe36c229586e7e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page