Skip to main content

Reliability library for Spark-on-AWS-Lambda lakehouse writes with timeout rollback, checkpoints, and orphan cleanup.

Project description

IceGuard

IceGuard

PyPI PyPI downloads (month) PyPI downloads (week) Python License

Published on PyPI: pypi.org/project/iceguard · Download stats: pepy.tech/project/iceguard (aggregated; PyPI does not expose per-version counts in the API)

Reliability library for Spark-on-AWS-Lambda (SoAL) lakehouse writes. Chunked writes with timeout rollback, S3 checkpoints, orphan cleanup, and optional CloudWatch or OpenTelemetry metrics.

Capability Out of the box You provide
Timeout rollback between chunks Yes
Checkpoint resume (S3) Yes S3 bucket
S3 path cleanup on rollback Yes (track_paths)
Iceberg / Delta / Hudi adapters Yes (S3 fallback) Catalog / commit client for metadata
Orphan scan CLI Yes IAM on table path
Blocking df.write.save() in protect() only No Use write_dataframe

Install

pip install iceguard

# With optional extras
pip install "iceguard[spark,iceberg,hudi,otel]==1.0.0"

# From source (specific tag)
pip install "git+https://github.com/vaquarkhan/IceGuard.git@v1.0.0"

Extras: [spark], [iceberg], [hudi], [otel], [dev]

Quick start

import iceguard

with iceguard.protect(context, s3_bucket="my-checkpoints") as writer:
    writer.write(
        path="s3://lake/db/table",
        total_records=10_000,
        batch_writer=lambda s, e: write_chunk(s, e),
        track_paths=lambda s, e: new_paths(s, e),
    )

Spark: iceguard.write_dataframe(writer, df, path, write_format="iceberg")

CLI: iceguard orphans scan s3://lake/db/table --json

Repository layout

Path Purpose
docs/ Full documentation
examples/ Python, SAM, CDK samples
terraform/ Modular production IaC
infra/cloudwatch/ Dashboard JSON
src/iceguard/ Library source

Development

pip install -e ".[dev]"
pytest tests --cov=iceguard
python validation/run_all.py

Release status

See docs/STATUS.md for capability checklist. v1.0.0 is published via GitHub Actions trusted publishing (OIDC) on release tags.

Documentation

License

MIT — see 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

iceguard-1.0.0.tar.gz (27.6 kB view details)

Uploaded Source

Built Distribution

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

iceguard-1.0.0-py3-none-any.whl (38.0 kB view details)

Uploaded Python 3

File details

Details for the file iceguard-1.0.0.tar.gz.

File metadata

  • Download URL: iceguard-1.0.0.tar.gz
  • Upload date:
  • Size: 27.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for iceguard-1.0.0.tar.gz
Algorithm Hash digest
SHA256 108d7c298c4125091942a893057ca3fa755714c9a9226cd70375bb02ef21da0d
MD5 413fb5f497006d404c82eb9c0d3883ce
BLAKE2b-256 8f2e9bd5cf66510fb27d92a82d8a2e13f4bd6c8e2f9504af9c2cabce74f9b96f

See more details on using hashes here.

Provenance

The following attestation bundles were made for iceguard-1.0.0.tar.gz:

Publisher: publish-pypi.yml on vaquarkhan/IceGuard

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

File details

Details for the file iceguard-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: iceguard-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 38.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for iceguard-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 87cf7b27d12d1441dac319e94b9a0957f5ec4fb8575d6b0d9d2b822e94eb7572
MD5 47502cad26d36b9ba33755e4e8acc9ff
BLAKE2b-256 e05246b477b2eaec44f0f56b528a4fb0533f5be670e819ddb58d76072819180a

See more details on using hashes here.

Provenance

The following attestation bundles were made for iceguard-1.0.0-py3-none-any.whl:

Publisher: publish-pypi.yml on vaquarkhan/IceGuard

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

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