Skip to main content

starfix-python

Pure-Python implementation of the starfix Arrow logical hasher.

Produces stable SHA-256 hashes of Arrow tables, record batches, and arrays that are:

  • Column-order independent — reordering columns does not change the hash
  • Batch-split independent — splitting data across batches does not change the hash
  • Cross-language compatible — identical hashes to the Rust implementation

Installation

pip install starfix

Usage

import pyarrow as pa
from starfix import ArrowDigester

schema = pa.schema([
    pa.field("id", pa.int32(), nullable=False),
    pa.field("value", pa.float64(), nullable=True),
])

# Hash a full table
table = pa.table({"id": [1, 2, 3], "value": [1.1, 2.2, 3.3]}, schema=schema)
digest = ArrowDigester.hash_table(table)

# Streaming: feed record batches incrementally
digester = ArrowDigester(schema)
for batch in batches:
    digester.update(batch)
digest = digester.finalize()

Metadata hashing

By default, Arrow schema- and field-level metadata are excluded from the hash, preserving hash format 0.0.1 stability. Pass include_metadata=True to any entry point to include them:

# One-shot
digest = ArrowDigester.hash_table(table, include_metadata=True)

# Streaming
digester = ArrowDigester(schema, include_metadata=True)
for batch in batches:
    digester.update(batch)
digest = digester.finalize()

When include_metadata=True, adding or changing any metadata key or value on any field (including nested struct children and list element fields) produces a different hash. Metadata key ordering is deterministic — the hash is stable regardless of insertion order.

A schema with no metadata produces the same hash regardless of include_metadata (empty-metadata invariant).

License

MIT OR Apache-2.0

Metadata

Release files for starfix 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for starfix 0.4.0
File Size Uploaded Provenance
starfix-0.4.0.tar.gz 71.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for starfix 0.4.0
File Interpreter ABI Platform
starfix-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 82.6 kB

Release files / starfix-0.4.0.tar.gz

Download URL starfix-0.4.0.tar.gz
Size 71.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e63711756640d4618d34c58f9d80ed7de9722f50ff806ec0ceecdcf151f26e48
BLAKE2b-256 checksum
How to use checksums
fcc1f3269cca708e13d47bf86c5459f9575e436e99d88cd29fec9e5cfd1d6003
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / starfix-0.4.0-py3-none-any.whl

Download URL starfix-0.4.0-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ec6c423eb131bfde1471a03219eea46389603753c30d90bdf3bfbe2bf8863c3
BLAKE2b-256 checksum
How to use checksums
1fa2b08c4c9e3e95e6e4224ad1fe857a2eaef1e473d9db6063d8151f5e8ac21f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for starfix 0.4.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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