Skip to main content

ShuETL

PyPI version PyPI - Python Version CI License

ShuETL (pronounced “shuttle”) is the opinionated FastAPI integration and deployment package for ETLantic.

ShuETL composes ETLantic into a durable, schedulable FastAPI service.

ShuETL does not reimplement ETLantic's pipeline or control-plane semantics. Instead, it assembles ETLantic's public packages, contracts, stores, and runtime roles into a coherent application-facing experience.

  • ETLantic owns canonical pipeline definitions and revisions, planning, execution semantics, durable submission, run and attempt state, scheduling, reports, events, artifacts, idempotency, recovery, and provider protocols.
  • etlantic-fastapi is ETLantic's low-level HTTP adapter and authoritative source of ETLantic request, response, route, SSE, and error semantics.
  • ShuETL owns opinionated composition: configuration, provider wiring, FastAPI mounting, lifecycle integration, deployment profiles, compatibility pins, optional ecosystem adapters, and operator-focused documentation.

If a required semantic capability is absent from ETLantic, the default response is to add it to ETLantic or one of its provider packages. ShuETL must not create a competing Pipeline, Run, Schedule, Artifact, or executor model.

Architecture principles

  • Integrate; do not reinterpret.
  • One ETLantic contract at every boundary.
  • Useful defaults, replaceable providers.
  • FastAPI-native composition and lifecycle.
  • Development convenience must not become a false production guarantee.
  • SQL-only infrastructure baseline where the selected ETLantic providers support it.

The reference ecosystem can compose in one FastAPI application:

FastAPI host
├── Hedron presentation (optional)
├── AuthMate identity adapter (optional)
└── ShuETL
    ├── etlantic-fastapi
    ├── ETLantic control-plane/runtime contracts
    └── ETLantic persistence and execution providers

Hedron and AuthMate remain optional peer packages. ShuETL integrates with them through public contracts and FastAPI dependencies.

Status

ShuETL 0.3.0 is the current development release. It provides a typed FastAPI facade for local development and automated tests. It accepts a prebuilt etlantic_fastapi.ETLanticAPI; the 0.3 local bundle additionally wires exact upstream memory providers and an opt-in, pre-provisioned SQLite profile. Both profiles are development-only and are not a production durability claim.

The complete design pack is in docs/plans/.

The implementation contracts are in docs/plans/PHASE_0_1_EXECUTION.md and docs/plans/PHASE_0_2_EXECUTION.md, with the Phase 0.3 contract in docs/plans/PHASE_0_3_EXECUTION.md.

Install

python -m pip install "shuetl==0.3.0"
# Optional pre-provisioned SQLite provider
python -m pip install "shuetl[sqlite]==0.3.0"

Quickstart

from fastapi import FastAPI
from shuetl import ShuETL

integration = ShuETL(api=prebuilt_etlantic_api)
app = FastAPI(lifespan=integration.lifespan)
integration.mount(app, prefix="/etl")

Use integration.create_app() for a dedicated root-mounted application. Prefixes are literal slash-prefixed segments (/etl, /internal/etl); use "" for the root. Mounting rejects occupied state keys, route namespaces, operation IDs, and custom ControlPlaneError handlers before mutating the host. Dependency overrides target the original ETLantic callables through ordinary FastAPI APIs.

For tests, override the exact upstream dependencies and remove them normally:

app.dependency_overrides[integration.api.principal_dependency] = override_principal
app.dependency_overrides[integration.api.context_dependency] = override_context
# ...test...
app.dependency_overrides.pop(integration.api.principal_dependency, None)
app.dependency_overrides.pop(integration.api.context_dependency, None)

Mount the integration before startup. ShuETL does not start, stop, close, or mutate caller-owned providers; the host remains responsible for their lifecycle. When a host lifespan is present, compose it explicitly: the host enters first and ShuETL exits before the host. The host first initializes providers, then ShuETL records its active mount:

from contextlib import asynccontextmanager


@asynccontextmanager
async def host_lifespan(app):
    # Initialize caller-owned ETLantic providers here.
    yield
    # Close caller-owned providers here.


app = FastAPI(lifespan=integration.compose_lifespan(host_lifespan))
integration.mount(app, prefix="/etl")

Prefixes are literal path segments: use "" for the root, or a slash-prefixed sequence of ASCII letters, digits, ., _, ~, and - segments. A prefix may not have a trailing slash or contain empty, dot, or dot-dot segments, route parameters, query or fragment markers, percent escapes, backslashes, whitespace, or control characters. InvalidPrefixError reports invalid prefixes. Mounting raises MountConflictError before mutation when reserved state, handlers, route namespaces, or operation IDs collide; resolve the host conflict before retrying.

Phase 0.3 adds immutable ShuETLSettings, LocalProviderBundle, and the redacted shuetl doctor preflight CLI. Settings use SHUETL_* environment variables; constructor values override the environment. SQLite files must be provisioned and migrated by upstream tooling before the bundle is created. ShuETL never migrates, creates tables, executes pipelines, or accepts anonymous identity. The host supplies the authorizer, context factory, principal dependency, and closes the bundle.

Settings contract

The supported settings are:

Environment variable Meaning Default
SHUETL_PROFILE Deployment profile; currently local required
SHUETL_ROLE Runtime role; currently gateway required
SHUETL_PROVIDER memory or sqlite required
SHUETL_IDENTITY Host-supplied identity mode; currently host required
SHUETL_API_PREFIX Mount prefix /etl
SHUETL_ROUTE_PRESET Route set; currently complete complete
SHUETL_DATABASE_URL Existing local SQLite file URL none
SHUETL_PROVIDER_CONNECT_TIMEOUT_SECONDS SQLite connection timeout 2.0

The four required values fail closed when omitted. Constructor arguments take precedence over environment variables. Names are case-sensitive and only the listed SHUETL_* environment variables are read; dotenv files, secret files, and structured configuration sources are not consulted. Database URLs are redacted from representations and diagnostics. The host owns bundle cleanup and must call close() during application shutdown.

SQLite is local-only: use an absolute or relative file URL with the sqlite or sqlite+pysqlite driver, and provision the file to migration head 004_schedules_0_47 with ETLantic's upstream tooling before startup. ShuETL does not create tables or run migrations. The local memory and SQLite profiles are development-only; production durability, authentication, scheduling, and worker operation remain outside this package.

shuetl doctor
shuetl doctor --format json
shuetl --version

Doctor checks report pass, warn, fail, or skip. The overall report is pass when no required check fails; each failed check includes a safe remediation message. Exit 0 indicates a passing report, exit 1 indicates a failed required check, and exit 2 indicates command-line usage or unexpected internal errors. Text and JSON formats contain the same redacted facts.

To run the local evidence gate:

uv sync --locked --all-groups --extra test --extra sqlite
uv run python scripts/capture_openapi.py
uv run python scripts/check_release.py

Planned ShuETL capabilities

  • mount a curated ETLantic API into an existing FastAPI application;
  • create a complete FastAPI application from explicit ETLantic providers;
  • validate provider compatibility and production readiness at startup;
  • configure ETLantic definition, submission, event, schedule, and persistence providers without exposing their implementation details to application code;
  • offer safe local-development defaults;
  • document and test separate gateway, scheduler, and worker roles for production;
  • integrate host authentication/authorization with ETLantic's control-plane context and authorizer contracts;
  • publish a tested compatibility matrix across FastAPI and ETLantic packages;
  • provide optional Hedron and AuthMate composition adapters when those packages are available.

Deployment goal

Local development may use one process and SQLite or in-memory providers.

The production reference uses one installable application/image with separate supervised roles:

FastAPI gateway
+
ETLantic scheduler/worker process or supported external execution host
+
PostgreSQL

The baseline should not require Redis, RabbitMQ, Kafka, an object store, or an external scheduler. “No required broker” does not imply that long-running ETL work executes inside the FastAPI gateway process.

Download files

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

Source Distribution

shuetl-0.3.0.tar.gz (189.6 kB view details)

Uploaded Source

Built Distribution

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

shuetl-0.3.0-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file shuetl-0.3.0.tar.gz.

File metadata

  • Download URL: shuetl-0.3.0.tar.gz
  • Upload date:
  • Size: 189.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for shuetl-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d913f36299b8f6a8267a052f32e19086ae160c88e60b59c5707513a74cbc8d8d
MD5 9adabfe6dca7db894195649095068c3d
BLAKE2b-256 7f3d665011e431450cb9eb4e937d769896c5b8792087a646a85e7156b95bcfd1

See more details on using hashes here.

Provenance

The following attestation bundles were made for shuetl-0.3.0.tar.gz:

Publisher: release.yml on eddiethedean/shuetl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file shuetl-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: shuetl-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for shuetl-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 737792f2f4583c6c4f4bb9aee3d6ed32521d7f641bb1dab2c209accdd8c30cbc
MD5 72f4b414abb7ebbf7ecb5b0122022208
BLAKE2b-256 63e3a7e06544aea371852b617526f8710ea72ca3243e3254169146afd83003fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for shuetl-0.3.0-py3-none-any.whl:

Publisher: release.yml on eddiethedean/shuetl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.4.0

2 files

This release

0.3.0 This release

2 files

0.2.0

2 files

0.1.0

2 files

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