Skip to main content

High-performance framework for layout-resilient Excel table extraction

Project description

Tabularix Logo

Smart, layout-resilient data extraction from Excel documents.


Tabularix

Tabularix is a high-performance framework designed to identify, extract, and organize "hidden data" trapped in fragmented, messy Excel files. It transforms highly variable visual spreadsheets into clean, structured formats (such as Apache Arrow tables, Pandas DataFrames, or Polars DataFrames) at native speeds.

Developed as a direct continuation of the Archery framework, it combines a blazing-fast Rust core engine with ergonomic Python scripting bindings to enable powerful "Configuration as Code" recipes.


🚀 Installation

Install the stable package directly from PyPI:

pip install tabularix

Build from Source

To compile the native Rust extension and install the package locally, make sure you have mise and just installed:

# Clone the repository
git clone https://github.com/pcasteran/tabularix.git
cd tabularix

# Set up toolchains
mise install

# Compile the native bindings
just build

💡 Quick Example

The Scenario

Suppose we have a spreadsheet containing a sales report table surrounded by empty rows, headers, and metadata, as shown in the layout analysis below:

Visual Structure of the Spreadsheet

Instead of hardcoding static cell coordinates (e.g., A3:E8) which break when columns or rows are added, deleted, or shifted, Tabularix uses Range Matchers to dynamically locate table boundaries relative to their visual markers.

The following example shows how to define the header and data patterns, locate the table, and export it:

import polars as pl
from tabularix import (
    extract_table_with_header_and_data,
    grid,
    group,
    load_workbook,
    non_empty,
    regex,
    value,
)

# 1. Load the workbook and get the target worksheet.
workbook = load_workbook("tests/data/sample.xlsx")
sheet = workbook.get_sheet("complex")

# 2. Define the header row pattern (starts with "Region", then 4 Quarters matching Q1-Q4 regex).
header_pattern = group(
    value("Region"),
    regex(r"^Q[1-4]$").repeat(min=4, max=4)
)

# 3. Define the data row pattern (region name, then 4 non-empty numeric quarter cells).
data_pattern = grid(
    group(
        regex(r"^(?!Total).*$"),  # Match any string except "Total" (the footer marker).
        non_empty().repeat(min=4, max=4)
    ).one_or_more()
)

# 4. Extract the structured Table with dynamic coordinate scanning.
table = extract_table_with_header_and_data(
    sheet,
    header_pattern,
    data_pattern,
    clean_names=True
)

# 5. Export zero-copy to a Polars or Pandas DataFrame.
df = pl.from_arrow(table.to_arrow())
print(df)

📖 Documentation

For full guides, detailed tutorials, and API reference, please visit our Official Documentation Site.


⚡ Core Features

  • High-Performance Rust Core: Performs CPU-heavy Excel manipulation, boundary scanning, and cell matching at native speeds.
  • Privacy-First & Secure: Runs entirely locally on your hardware. No external APIs or third-party servers are queried.
  • Python Ergonomics: Natural integration with standard Python tools, dynamic typing support, and full PEP 8 compliance.
  • Zero-Copy FFI: Seamless exports to Apache Arrow tables, Pandas, Polars, and DuckDB.

🤝 Contributing

Contributions are welcome! Please read our Development Guidelines (or the root CONTRIBUTING.md) for details on local environment setup, testing, formatting checks, and repository workflows.


⚖️ License

Tabularix is dual-licensed under the Apache 2.0 and MIT licenses.

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in Tabularix by you, as defined in the Apache-2.0 license, shall be dually licensed as above, without any additional terms or conditions.

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

tabularix-0.3.3.tar.gz (668.2 kB view details)

Uploaded Source

Built Distributions

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

tabularix-0.3.3-cp312-abi3-win_amd64.whl (741.9 kB view details)

Uploaded CPython 3.12+Windows x86-64

tabularix-0.3.3-cp312-abi3-manylinux_2_34_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12+manylinux: glibc 2.34+ x86-64

tabularix-0.3.3-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (941.1 kB view details)

Uploaded CPython 3.12+manylinux: glibc 2.17+ ARM64

tabularix-0.3.3-cp312-abi3-macosx_11_0_arm64.whl (865.5 kB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

tabularix-0.3.3-cp312-abi3-macosx_10_12_x86_64.whl (878.0 kB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

Details for the file tabularix-0.3.3.tar.gz.

File metadata

  • Download URL: tabularix-0.3.3.tar.gz
  • Upload date:
  • Size: 668.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for tabularix-0.3.3.tar.gz
Algorithm Hash digest
SHA256 e118f8ba8760681f1db782eb523e633d6e367d6fb865e4df8d73056c48bd962f
MD5 8d83b1c0ce45c260bc93883d931ba47b
BLAKE2b-256 1ed150d95bc902d006c4bb8d04d02d2f9eaf0b72781e5a316ab1da2d1a44cddd

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.3.3.tar.gz:

Publisher: release.yml on pcasteran/tabularix

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

File details

Details for the file tabularix-0.3.3-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: tabularix-0.3.3-cp312-abi3-win_amd64.whl
  • Upload date:
  • Size: 741.9 kB
  • Tags: CPython 3.12+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for tabularix-0.3.3-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 517418eb76cc3c70c9af5046a0100b64fa56fe825447e5012f8924c39121f79d
MD5 7d6e38509e49d103caf4b1a67ac47247
BLAKE2b-256 bd044e2abe0225477444dfada0b0f328b0e37c75c9b9813a45fee7f7e04c2e40

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.3.3-cp312-abi3-win_amd64.whl:

Publisher: release.yml on pcasteran/tabularix

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

File details

Details for the file tabularix-0.3.3-cp312-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for tabularix-0.3.3-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 100d57ab59b98c406afd6f4b9460b23678014fa563f01416909785e11c2f80b7
MD5 45318e374d5f812d91d5cac1cc2a5c51
BLAKE2b-256 c03a936b270aa19607ac8cf40df89c301b6f7c41f63bf23185c3001fa0b01faf

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.3.3-cp312-abi3-manylinux_2_34_x86_64.whl:

Publisher: release.yml on pcasteran/tabularix

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

File details

Details for the file tabularix-0.3.3-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for tabularix-0.3.3-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2417a04fe239175b6dfa082ec99ae5f30b47bc1c5a940e82ceec9251c0031e63
MD5 eccfd96987e8cb41ecbc3350aa45354b
BLAKE2b-256 b06a0ddc54a905cb4986afaa6ce1a5a49227be2810eacf59db7548c7706b0100

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.3.3-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on pcasteran/tabularix

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

File details

Details for the file tabularix-0.3.3-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tabularix-0.3.3-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9a02ef40ac745dccc1f2f5972910d030143700bab418e1c21e032ae7e9823c35
MD5 feb1369b3f500e51ba3e165a5cf290a8
BLAKE2b-256 f0a2db568cc219a50178107b51535f73e400547920f5de20013cb4e7842d09f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.3.3-cp312-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on pcasteran/tabularix

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

File details

Details for the file tabularix-0.3.3-cp312-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for tabularix-0.3.3-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e8a6efb643c57c0b124586f41f9c7ed691eb187a50f5d7f5b41e72adb1c9cf9d
MD5 3f6fe7c5a4cfe045194498e7693bcafe
BLAKE2b-256 f0d00d6f63fcad33a6e896daa675f7d00725ca150b9ddf5196bd734f20a70191

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.3.3-cp312-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on pcasteran/tabularix

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