Community Version of the B2B Antigravity PySpark Framework. Essential utilities for AWS FinOps and Cloud cost optimization.
Project description
🚀 Antigravity Lite (FinOps & AWS Glue Tools)
AWS Financial Auditor and Smart S3 Manager for PySpark Ecosystems
🛑 The Silent AWS Glue Killer: Spark's Catalyst Optimizer
Have you ever wondered why your massive PySpark cluster just hangs for hours, consuming 100% CPU without writing a single byte of data when processing a Wide Dataframe?
Many Data Engineers blame data skew or bad partitioning, panicking and upscaling AWS Glue Worker instances to expensive G.4X or G.8X tiers. But throwing money at RAM is not the solution. The architectural solution is not buying more RAM; it's isolating the math.
📦 Installation
pip install antigravity-lite
🛠 Included Open-Source Tools
1. Smart S3 Renamer (S3Finalizer - Universal API)
Tired of PySpark polluting your Datalake with part-00000... strings and empty _SUCCESS files?
S3Finalizer is a native Boto3 utility that scans raw outputs and renames them sequentially and cleanly without breaking cluster concurrency. It works with Apache Spark, AWS Glue DynamicFrames, and standard S3 files seamlessly.
from antigravity_lite.io.s3_finalizer import S3Finalizer
finalizer = S3Finalizer(bucket_name="my-corporate-datalake")
# Automatically re-sequence and format any outputs natively
finalizer.sequence_files(
s3_prefix="raw_zone/sales/",
pattern="ENTERPRISE_REPORT_{seq:04d}.parquet",
starts_with="", # Optional: Target specific outputs (e.g. "0000_part")
ends_with=".parquet",# Optional: Ignore non-parquet files
contains="part" # Optional: Filter
)
# Magic Output: ENTERPRISE_REPORT_0001.parquet
2. AWS Glue FinOps Auditor (AgAuditor)
Inject this standalone tool to scan your AWS CloudWatch telemetry and compute exactly how many thousands of dollars you are wasting each month on inflated AWS Worker instances just to keep Spark's Catalyst Optimizer from crashing.
from antigravity_lite.auditor.finops import AgAuditor
# Scan the cluster using CloudWatch and AWS APIs
AgAuditor.run_aws_audit(region="us-east-1", dias_analisis=7)
Console Output: It will accurately map your allocated Workers (G.1X, G.4X) against real compressed JVM Heap usage to reveal your exact financial capital leak.
3. S3 Directory Explorer (AgS3DirectoryLister)
Tired of discovering that AWS S3 is a flat namespace and doesn't have real "folders"? Listing hierarchies in Boto3 using the CommonPrefixes property is frustrating.
AgS3DirectoryLister abstracts all the pain of native pagination and returns a clean logical "folder" tree.
from antigravity_lite.io import AgS3DirectoryLister
explorer = AgS3DirectoryLister()
child_folders = explorer.list_folders("s3://your-bucket/datalake/bronze/")
# Prints a convenient tree structure in your terminal mimicking `ls`
explorer.print_tree("s3://your-bucket/datalake/bronze/")
4. Multithreaded S3 Smart Copier (AgS3SmartCopier)
Cloning or merging massive Datalakes in S3 using traditional iterative scripts chokes your network and takes all afternoon. Additionally, spinning up a Spark cluster just to "copy data" is a gross waste of AWS billing.
AgS3SmartCopier spins up an asynchronous swarm in pure Python ThreadPoolExecutor to transfer thousands of files applying mathematical filters, at a fraction of the time of a conventional Boto3 script.
from antigravity_lite.io import AgS3SmartCopier
copier = AgS3SmartCopier()
# Ultra-fast massive copy without spinning up Spark
copier.copy_path(
origin_path="s3://data-lake/raw/",
dest_path="s3://data-lake/historical/",
starts_with="SALES_2026",
ends_with=".parquet", # Filters to ignore hidden trash files
max_workers=10 # CPU threads fired simultaneously
)
5. Memory Optimizing Chunker (DataFrameChunkerLite)
Does your Spark cluster throw Java Heap Space / OutOfMemoryError when saving Wide DataFrames with dozens of columns?
DataFrameChunkerLite intercepts Spark's execution graph, truncating the mathematical lineage using Logarithmic Tree-Reduction methodologies so your cluster survives without scaling your AWS infrastructure.
Important Note: This is the community Freemium version and is hard-capped to a maximum of 100 columns. If you run this on a wider dataframe, it will safely reject execution.
from antigravity_lite.core import DataFrameChunkerLite
# 1. Provide the wide dataframe and the primary key
chunker = DataFrameChunkerLite(df_crashing, id_cols=["client_id"], chunk_size=20)
def business_logic(chunk_df, index):
# This logic now runs isolated and safe from Catalyst OOM
for c in chunk_df.columns:
if c != "client_id":
chunk_df = chunk_df.withColumn(c, chunk_df[c] * 1.5)
return chunk_df
# 2. Slice and safely process in parallel
results = chunker.process_chunks(business_logic)
# 3. Merges back all the columns automatically using O(log N) Binary Trees
df_final = chunker.join_chunks(results)
💎 Commercial Licensing (Antigravity PRO)
The Lite version can tell you you're burning thousands of dollars... Purchasing the Antigravity PRO Enterprise License actually fixes it.
If your AgAuditor report flags an "⚠️ AST/OOM RISK" or your Heap spikes past 85%, you need the DataFrameChunker mathematical engine (Exclusive to the Pro B2B Edition).
The enterprise version intercepts Spark's low-level planner and vertically slices the execution plan using Logarithmic Binary Trees (Tree Reduce) to forcibly truncate the AST Lineage. This drops your memory footprint so drastically that you can process half-a-billion operations on tiny G.1X clusters at zero OutOfMemory risk.
💻 Request a Proof-of-Concept or Live Architecture Demo for B2B deployment by connecting via LinkedIn.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file antigravity_lite-0.1.10.tar.gz.
File metadata
- Download URL: antigravity_lite-0.1.10.tar.gz
- Upload date:
- Size: 15.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2dbc46d3086da1a0233596a840ccdb2754a0c15700cd477ae049f076139c0103
|
|
| MD5 |
7b0856d31d5c47365a53859b79cee68e
|
|
| BLAKE2b-256 |
f227651001b9b98add5b409fd9df477c42735630f95a0e75dfbd81775f7c0e9d
|
Provenance
The following attestation bundles were made for antigravity_lite-0.1.10.tar.gz:
Publisher:
publish-lite.yml on andresvega925/AntigravityFW
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
antigravity_lite-0.1.10.tar.gz -
Subject digest:
2dbc46d3086da1a0233596a840ccdb2754a0c15700cd477ae049f076139c0103 - Sigstore transparency entry: 1248636264
- Sigstore integration time:
-
Permalink:
andresvega925/AntigravityFW@38e7278bba0ef84b077929d5a67d9ed7d3f1f5cc -
Branch / Tag:
refs/heads/main - Owner: https://github.com/andresvega925
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-lite.yml@38e7278bba0ef84b077929d5a67d9ed7d3f1f5cc -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file antigravity_lite-0.1.10-py3-none-any.whl.
File metadata
- Download URL: antigravity_lite-0.1.10-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3e05aabf30a0ea8075453a596a28acb86da89a926564ac76f4efe337e3ff59c4
|
|
| MD5 |
6259cf84d4c29971a91c34c42d4418ef
|
|
| BLAKE2b-256 |
d873cc984577b72a44b5316402f6b8839f272749da5f98c3b0b0a2ac81e09b5d
|
Provenance
The following attestation bundles were made for antigravity_lite-0.1.10-py3-none-any.whl:
Publisher:
publish-lite.yml on andresvega925/AntigravityFW
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
antigravity_lite-0.1.10-py3-none-any.whl -
Subject digest:
3e05aabf30a0ea8075453a596a28acb86da89a926564ac76f4efe337e3ff59c4 - Sigstore transparency entry: 1248636328
- Sigstore integration time:
-
Permalink:
andresvega925/AntigravityFW@38e7278bba0ef84b077929d5a67d9ed7d3f1f5cc -
Branch / Tag:
refs/heads/main - Owner: https://github.com/andresvega925
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-lite.yml@38e7278bba0ef84b077929d5a67d9ed7d3f1f5cc -
Trigger Event:
workflow_dispatch
-
Statement type: