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.2.tar.gz (668.0 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.2-cp312-abi3-win_amd64.whl (741.9 kB view details)

Uploaded CPython 3.12+Windows x86-64

tabularix-0.3.2-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.2-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.2-cp312-abi3-macosx_11_0_arm64.whl (865.5 kB view details)

Uploaded CPython 3.12+macOS 11.0+ ARM64

tabularix-0.3.2-cp312-abi3-macosx_10_12_x86_64.whl (877.1 kB view details)

Uploaded CPython 3.12+macOS 10.12+ x86-64

File details

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

File metadata

  • Download URL: tabularix-0.3.2.tar.gz
  • Upload date:
  • Size: 668.0 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.2.tar.gz
Algorithm Hash digest
SHA256 95a9dd83c8a3ab3573300b4aa96743cbc50b696fa59fcc5ca5c7c3352b0874ae
MD5 b2665271541dc813571566d52637cdd7
BLAKE2b-256 6caffd63e2bf846d322016cef55b8cb4ce506392a962acf794c0d254cdca25fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.3.2.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.2-cp312-abi3-win_amd64.whl.

File metadata

  • Download URL: tabularix-0.3.2-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.2-cp312-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4fd155b103208ba237e44941242021f7f0cfa03e7c2bf9c8b72f4197f06e65b3
MD5 1825ce46297cf84f7fb2fd3ca336e408
BLAKE2b-256 80c74fb271e8b9e8b08800561db2b762bf0c11685555a929b3b3f83f643300c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.3.2-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.2-cp312-abi3-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for tabularix-0.3.2-cp312-abi3-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 84cc78af819782ba7ce04e090c64f7ede7f062b0cfb17b63ab0c5b39e8f095ba
MD5 67e542eaf1776eef1c9673467b0b4ef7
BLAKE2b-256 dbe1ea7fcc1ee5305103e8707675d031df295e5c5720c151aad0cfc95818d2ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.3.2-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.2-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for tabularix-0.3.2-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 1d0645a181201e2dd4c8109aa72092d56a9a5468b67b77b9d4d5ae8ecbbb91e2
MD5 7a791596bc6bee8ab83b01121cb88ffd
BLAKE2b-256 8b41b6ae325861c1ce95fa8534527baaaf48860904c44e435d51082b7a750fe6

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.3.2-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.2-cp312-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tabularix-0.3.2-cp312-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 164294ca5b68fe5c301240b5144d8cf22fe12b1a8966d5eeec86be7b56713e07
MD5 46f8b96a0a223cfc5c6591ffeac3c59e
BLAKE2b-256 b252af561c9760604a1a7958d84f242c4153abcf2727b55ccb7e336f9f2ee550

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.3.2-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.2-cp312-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for tabularix-0.3.2-cp312-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 15a5ebd5f4b9a4a171cfa8817846089e3c432c22a52984ffe186870e9dc4e0f7
MD5 48a53fdbbdda845286e0c030cc86df60
BLAKE2b-256 dba705a26ab8dbdb34f7b46fc5a055ca10ccc671f650dae57f7be06170871f13

See more details on using hashes here.

Provenance

The following attestation bundles were made for tabularix-0.3.2-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