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, validate, and reason about ETL logic in a fully controlled, in-memory environment.

It provides a minimal and explicit execution model where ETL functions are registered, composed, executed sequentially, and inspected — without schedulers, persistence layers, or external infrastructure.

Fragua is intentionally simple. Its goal is clarity over completeness.


Purpose

Fragua exists to answer a small, focused set of questions:

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

It is not a workflow orchestrator nor a production-grade ETL engine.
Fragua is a developer-oriented framework for modeling, validating, and experimenting with ETL logic during development.


Core Model

Fragua is built around a small set of orthogonal, loosely coupled components.

1. FraguaSet

A FraguaSet is a logical namespace for functions.

  • Stores named callables
  • Groups functions by purpose (e.g. extract, transform, load, utility)
  • Contains no execution logic
  • Has no knowledge of pipelines or data

Sets are created explicitly and only when needed.


2. FraguaRegistry

The registry is a lookup and organization layer.

  • Holds multiple FraguaSet instances
  • Resolves functions by (set_name, function_name)
  • Does not execute anything

The registry enables flexible function categorization without hardcoded assumptions.


3. FraguaStep

A FraguaStep represents a single declarative execution unit.

  • References a function by name (resolved at runtime)
  • Declares execution parameters
  • Optionally consumes the output of a previous step
  • Stores its result under a logical key (save_as)

A step defines what should happen, not how it happens.


4. FraguaPipeline

A pipeline is an ordered execution plan.

  • Defines a sequence of FraguaStep
  • Preserves execution order
  • Contains no execution logic

Pipelines are pure definitions executed by an agent at runtime.


5. FraguaAgent

The agent is a stateless execution primitive.

  • Receives a pipeline
  • Resolves step functions via the registry
  • Executes steps sequentially
  • Produces execution results

The agent contains no domain logic and holds no state between runs.


6. FraguaWarehouse

The warehouse is an in-memory result store.

  • Stores outputs of all executed steps
  • Indexed by save_as
  • Intended for inspection, debugging, and assertions

The warehouse exists purely at runtime.


7. FraguaEnvironment

The environment is the composition and orchestration boundary.

It owns:

  • One registry
  • One agent
  • One warehouse

It provides APIs to:

  • Create and manage function sets
  • Register functions and pipelines
  • Execute pipelines
  • Retrieve execution results

The environment does not impose structure — it enables it.


Helper Abstractions

Fragua includes optional helpers to reduce boilerplate while preserving explicitness.

Composite Transform Functions

transform_fn_schema allows composing multiple transformation functions into a reusable unit:

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

This enables declarative and reusable transformation logic without hidden execution.


Automatic Step Generation

generate_steps_sequence generates pipeline steps from function declarations:

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

Step generation remains explicit and deterministic.


Result Inspection

Helpers such as get_box_dfs_heads allow validated inspection of runtime results:

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

Errors are raised if expected outputs are missing or invalid.


Typical Workflow

  1. Create an environment
  2. Create one or more function sets
  3. Register ETL functions into sets
  4. Optionally compose transformations
  5. Define a pipeline
  6. Execute the pipeline
  7. Inspect results from the warehouse

Design Principles

Fragua adheres to the following principles:

  • Minimalism — no feature without a clear purpose
  • Explicitness — no hidden behavior
  • Single Responsibility — each component does one thing
  • Runtime-only — no persistence, no 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 framework 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.3.tar.gz (14.6 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.3-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for fragua-1.3.tar.gz
Algorithm Hash digest
SHA256 5c62d910708ce35329c29a8a51387fdeeb155b66b53e106883c3200c2b750fe0
MD5 7b5cdaa3fdc66fafddefbc71bf33a2a7
BLAKE2b-256 0bfe7b7e08842f8d6e103cae95aedf0622403ad0450ea088f00842031fc68225

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fragua-1.3-py3-none-any.whl
  • Upload date:
  • Size: 18.5 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3d09a828913776736dbe335288bd2582a535c194cc5c3deed0115e627f8d7f21
MD5 7f7c3f4bf2d2c3588750851dd47055b7
BLAKE2b-256 21ff760363e4a927e2ce2ed7e521dab6da37b1745d68ff83b70ef580f7f10acd

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