Skip to main content

Package for creating ETL environments for data analysis

Reason this release was yanked:

deprecated

Project description

Fragua

Fragua is a modular Python library for modeling and orchestrating ETL / ELT workflows through explicit execution environments, unified agents, and a strongly typed domain model.

Fragua is designed as an educational and experimental framework focused on architectural clarity, predictable execution, and explicit responsibility separation.


Core Concept

In Fragua, everything happens inside an Environment.

A FraguaEnvironment represents an isolated execution context that owns:

  • Component lifecycle and resolution
  • Execution context and security boundaries
  • Runtime state and metadata
  • Data persistence and traceability

Agents do not exist or operate independently. They are created, configured, and executed exclusively within an Environment.


Environment Responsibilities

The FraguaEnvironment is the central orchestrator of the system. It is responsible for:

  • Initializing and managing the Warehouse
  • Managing action contexts: extract, transform, load
  • Registering, resolving, and executing components
  • Managing execution credentials (tokens)
  • Providing a unified CRUD API for components
  • Exposing structured runtime summaries

Multiple environments can coexist, each representing an independent pipeline, experiment, or workflow.


Unified Component Management

All components in Fragua are managed through a single, unified CRUD API exposed by the Environment.

Components are resolved by:

  • Action (extract, transform, load)
  • Component type (agent, function, internal_function, set)

This unified approach:

  • Eliminates duplicated logic
  • Reduces coupling between modules
  • Guarantees consistent runtime behavior

Agents and Execution Model

Fragua uses a single unified agent model (FraguaAgent).

Agents:

  • Are instantiated exclusively by the Environment
  • Receive mandatory execution credentials
  • Can execute:
    • Registered functions by name
    • Callables provided at runtime
    • Internal transform and load functions
    • Full transform pipelines
  • Normalize inputs to pandas.DataFrame
  • Interact with data exclusively through the Warehouse
  • Generate execution metadata and operation records (with undo support)

Agents act as controlled executors, not as owners of configuration or state.


Execution and Configuration Flow

Fragua follows an explicit execution-context model.

  • Parameters and configuration are passed explicitly through function calls
  • Transform pipelines propagate context between steps
  • Functions declare their supported configuration via metadata (config_keys)
  • No implicit or global parameter containers are used

This model improves:

  • Readability
  • Debuggability
  • Contract enforcement
  • Predictability of execution

Internal Functions and Pipelines

Fragua supports runtime registration and management of internal functions for transform and load actions.

Internal functions:

  • Can be registered as callables or metadata-based specifications
  • Expose explicit metadata (purpose, description, config keys)
  • Can be executed directly or composed into pipelines
  • Are fully managed through the Environment API

Security Model

Fragua enforces an explicit internal security model:

  • The Environment issues execution tokens
  • Agents consume tokens to operate
  • The Warehouse validates tokens for protected operations

This ensures that no agent can execute or access data outside a valid environment context.


Domain-Driven Typing

Fragua uses a strongly typed, enum-based domain vocabulary.

Enums define all core concepts, including:

  • Actions and component types
  • Storage and target types
  • Operations, fields, and attributes

This approach:

  • Eliminates magic strings
  • Centralizes validation
  • Improves IDE support and static analysis
  • Provides a clear and extensible domain language

Concise enum aliases are exported for ergonomic usage without sacrificing type safety.


Component Architecture

Fragua follows a layered component model:

  • FraguaComponent Base abstraction for all registrable elements.

  • FraguaSet Logical container for homogeneous components. Responsible for:

    • CRUD operations
    • Validation
    • Human-readable summaries
  • FraguaRegistry Groups and manages multiple FraguaSet instances within an Environment.

This separation ensures clarity between component definition, organization, and orchestration.


Warehouse and Data Traceability

Each Environment owns a Warehouse, which acts as the single source of truth for all data artifacts.

The Warehouse provides:

  • Controlled data operations
  • Full operation logging with timestamps
  • Undo support for destructive actions
  • Metadata-based summaries and inspection

Key Characteristics

  • Environment-centric orchestration
  • Unified agent model
  • Unified component lifecycle management
  • Explicit execution-context-based configuration
  • Strongly typed domain model
  • Isolated execution contexts
  • Centralized storage and traceability
  • Clear separation of responsibilities

Project Structure

fragua/
├── __init__.py
├── core/
├── registries/
├── sets/
└── utils/

Installation

python -m pip install -e .

⚠️ Fragua is published for educational and experimental purposes. It is not recommended for production use yet.


Author

Santiago Lanz 🌐 https://sagodev.github.io/Portfolio-Web-Santiago-Lanz/ 💼 https://www.linkedin.com/in/santiagolanz/ 🐙 https://github.com/SagoDev


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-0.8.0.tar.gz (36.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-0.8.0-py3-none-any.whl (45.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for fragua-0.8.0.tar.gz
Algorithm Hash digest
SHA256 44ab7d3ff9cd28bbd24c0a65bc4ea17e282ffdc196661c633d929171fb21051f
MD5 b35c498780fd4ca99d4d0bab0fbb7c04
BLAKE2b-256 21d6c8b281afaaa4c0b79c1e64eae48a5f34473898519f0725a3b6ad3ba9b74e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fragua-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 45.7 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.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8bbaf0c638cbbfdd816c1604fa2d7d9152803ae1c313fa419ab1d79dfdca94d3
MD5 1f9a5c22f3f4f809149abfa1bcffac40
BLAKE2b-256 9da10f37ccf410c429531eac7c7d16ed3a9765fd2657b030504fabbd8dc21e22

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