#!/usr/bin/env -S uv run
# /// script
# requires-python = ">=3.11"
# dependencies = ["pyarrow"]
# ///
import sys

import pyarrow as pa


table = pa.table({
    "sale_id": [1, 2, 3],
    "channel": ["store", "web", "store"],
    "amount": [120.0, 80.0, 50.0],
})
with pa.ipc.new_stream(sys.stdout.buffer, table.schema) as writer:
    writer.write_table(table)
