Skip to main content

Framework for modeling, orchestrating,and executing ETL pipelines in a controlled environment.

Project description

Fragua

Fragua is a lightweight Python framework designed to design, test, and validate ETL pipelines and functions in a controlled, in-memory environment.

It provides a minimal execution model where ETL functions can be registered, composed, executed in sequence, and their intermediate or final results inspected — without schedulers, persistence layers, or external infrastructure.

Fragua is intentionally simple and explicit by design.


Purpose

Fragua exists to answer a small set of focused questions:

Does this ETL function behave as expected?
Does this sequence of ETL steps produce the correct result?

It is not a workflow orchestrator or a production ETL engine.
It is a developer-oriented tool for modeling, validating, and experimenting with ETL logic.


Core Concepts

Fragua is composed of a small set of orthogonal components.

1. FraguaSet

A FraguaSet is a namespace for ETL functions.

  • Stores named callables
  • No execution logic
  • No awareness of pipelines or data

Typical sets are: extract, transform, load.


2. FraguaRegistry

The registry is a function index.

  • Holds multiple FraguaSet instances
  • Resolves functions by name
  • Performs no execution

3. FraguaAgent

The agent is a pure executor.

  • Receives a pipeline
  • Executes steps sequentially
  • Returns execution results

The agent contains no domain logic and no state.


4. FraguaPipeline

The pipeline represents an ordered execution plan.

  • Defines a sequence of FraguaStep
  • Preserves execution order
  • Declarative only (no execution logic)

A pipeline is executed by an agent at runtime.


5. FraguaStep

A step represents a single unit of execution.

  • References a registered function
  • Declares parameters
  • Optionally consumes the output of a previous step
  • Stores its result under a logical key (save_as)

A step describes what to execute, not how.


6. FraguaWarehouse

The warehouse is an in-memory result store.

  • Holds all step outputs
  • Indexed by save_as
  • Intended for inspection, debugging, and assertions

7. FraguaEnvironment

The environment is the orchestration boundary.

It owns:

  • One registry
  • One agent
  • One warehouse

It provides APIs to:

  • Register functions and pipelines
  • Execute pipelines
  • Retrieve results

Helper Abstractions

Fragua includes optional helpers to reduce boilerplate.

Composite Transform Functions

transform_fn_schema allows composing multiple transformation functions into a single reusable transform:

basic_transformation = fg.transform_fn_schema(
    name="basic_transformation",
    steps=[
        ("standardize", None),
        ("add_derived_columns", None),
    ],
    registry=env.registry,
)

This enables declarative, reusable transformation logic.


Automatic Step Generation

generate_steps_sequence creates a pipeline step sequence from function names:

steps = fg.generate_steps_sequence(
    ("extract_excel", {"path": "input.xlsx"}),
    ("basic_transformation", {}),
    ("load_to_csv", {"path": "output.csv"}),
)

Result Inspection

get_box_dfs_heads retrieves DataFrame previews from the warehouse with validation:

heads = fg.get_box_dfs_heads(box_result, pipeline.steps())

Errors are raised if results are missing or invalid.


Typical Workflow

  1. Create an environment
  2. Register ETL functions
  3. Optionally compose transformations
  4. Build a pipeline (manually or automatically)
  5. Execute the pipeline
  6. Inspect results from the warehouse

Design Principles

Fragua follows these principles:

  • Minimalism — no feature without purpose
  • Explicitness — no hidden magic
  • Single Responsibility — each component does one thing
  • Runtime-only — no persistence or side effects

What Fragua Is Not

Fragua is not:

  • A scheduler
  • A workflow orchestrator
  • A production ETL engine
  • A data platform

It is a developer tool for ETL design and validation.


License

MIT License

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-1.2.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

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

fragua-1.2-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for fragua-1.2.tar.gz
Algorithm Hash digest
SHA256 58305e79e70e6ce603a7c8d6b3bab482984dd750c9d1fc0b42aeb07ecc80709d
MD5 2a6ea2fe8c8548a9e56aa4291a1d090a
BLAKE2b-256 94d0f5fd8fea420fd3cae03e6b525d90cd9aca8a86c275c15ab056e50e2d2164

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for fragua-1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cb544de2c94d89de38aa57ca21f3cacc80fe16d68e20ba1e455455fd44616469
MD5 99911ddfd579ea5515524af6b0d1343f
BLAKE2b-256 51bbc234bb804fec5fb15e6cba4d45d025913bd9052afc94b8a27e77f1f8fb77

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