Skip to main content

kyrax

A fast excel file reader for Python and Rust.

Docs:

  • Python (local: make doc-serve)
  • Rust (local: cargo doc --open -p kyrax)

Stability

The Python library is considered production-ready. The API is mostly stable, and we avoid breaking changes as much as possible.

⚠️ The free-threaded build is still considered experimental

The Rust crate is still experimental, and breaking changes are to be expected.

Installation

# Lightweight installation (no PyArrow dependency)
pip install kyrax

# With Polars support only (no PyArrow needed)
pip install kyrax[polars]

# With Pandas support (includes PyArrow)
pip install kyrax[pandas]

# With PyArrow support
pip install kyrax[pyarrow]

# With all integrations
pip install kyrax[pandas,polars]

Quick Start

Modern usage (recommended)

kyrax supports the Arrow PyCapsule Interface for zero-copy data exchange with libraries like Polars, without requiring pyarrow as a dependency. Use kyrax with any Arrow-compatible library without requiring pyarrow.

import kyrax

# Load an Excel file
reader = kyrax.read_excel("data.xlsx")
sheet = reader.load_sheet(0)  # Load first sheet

# Use with Polars (zero-copy, no pyarrow needed)
import polars as pl
df = pl.DataFrame(sheet)  # Direct PyCapsule interface
print(df)

# Or use the to_polars() method (also via PyCapsule)
df = sheet.to_polars()
print(df)

# Or access the raw Arrow data via PyCapsule interface
schema = sheet.__arrow_c_schema__()
array_data = sheet.__arrow_c_array__()

Traditional usage (with pandas/pyarrow)

import kyrax

reader = kyrax.read_excel("data.xlsx")
sheet = reader.load_sheet(0)

# Convert to pandas (requires `pandas` extra)
df = sheet.to_pandas()

# Or get pyarrow RecordBatch directly
record_batch = sheet.to_arrow()

Working with tables

reader = kyrax.read_excel("data.xlsx")

# List available tables
tables = reader.table_names()
print(f"Available tables: {tables}")

# Load a specific table
table = reader.load_table("MyTable")
df = pl.DataFrame(table)  # Zero-copy via PyCapsule, no pyarrow needed

Key Features

  • Zero-copy data exchange via Arrow PyCapsule Interface
  • Flexible dependencies - use with Polars (no PyArrow needed) or Pandas (includes PyArrow)
  • Seamless Polars integration - pl.DataFrame(sheet) and sheet.to_polars() work without PyArrow via PyCapsule interface
  • High performance - written in Rust with calamine and Apache Arrow
  • Memory efficient - lazy loading and optional eager evaluation
  • Type safety - automatic type inference with manual override options

Contributing & Development

Prerequisites

You'll need:

  1. Rust - Rust stable or nightly
  2. uv - Fast Python package manager (will install Python 3.10+ automatically)
  3. git - For version control
  4. make - For running development commands

Python Version Management: uv handles Python installation automatically. To use a specific Python version:

uv python install 3.13  # Install Python 3.13
uv python pin 3.13      # Pin project to Python 3.13

Quick Start

# Clone the repository (or from your fork)
git clone <repository-url>
cd nextexcel

# First-time setup: install dependencies, build debug version, and setup pre-commit hooks
make setup-dev

Verify your installation by running:

make

This runs a full development cycle: formatting, building, linting, and testing

Development Commands

Run make help to see all available commands, or use these common ones:

make all          # full dev cycle: format, build, lint, test
make install      # install with debug build (daily development)
make install-prod # install with release build (benchmarking)
make test         # to run the tests
make lint         # to run the linter
make format       # to format python and rust code
make doc-serve    # to serve the documentation locally

Useful Resources

Benchmarking

For benchmarking, use make benchmarks which automatically builds an optimised wheel. This is required for profiling, as dev mode builds are much slower.

Speed benchmarks

make benchmarks

Memory profiling

mprof run -T 0.01 python python/tests/benchmarks/memory.py python/tests/benchmarks/fixtures/plain_data.xls

Creating a release

  1. Create a PR containing a commit that only updates the version in Cargo.toml.
  2. Once it is approved, squash and merge it into main.
  3. Tag the squashed commit, and push it.
  4. The release GitHub action will take care of the rest.

Dev tips

  • Use cargo check to verify that your rust code compiles, no need to go through maturin every time
  • cargo clippy = 💖
  • Careful with arrow constructors, they tend to allocate a lot
  • mprof and time go a long way for perf checks, no need to go fancy right from the start

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kyrax-1.0.2.tar.gz (188.2 kB view details)

Uploaded Source

Built Distributions

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

kyrax-1.0.2-cp314-cp314t-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.14tWindows x86-64

kyrax-1.0.2-cp314-cp314t-musllinux_1_2_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

kyrax-1.0.2-cp314-cp314t-musllinux_1_2_aarch64.whl (4.6 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ ARM64

kyrax-1.0.2-cp314-cp314t-manylinux_2_28_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ x86-64

kyrax-1.0.2-cp314-cp314t-manylinux_2_28_aarch64.whl (4.4 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ ARM64

kyrax-1.0.2-cp314-cp314t-macosx_11_0_arm64.whl (3.9 MB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

kyrax-1.0.2-cp314-cp314t-macosx_10_12_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.14tmacOS 10.12+ x86-64

kyrax-1.0.2-cp310-abi3-win_arm64.whl (3.7 MB view details)

Uploaded CPython 3.10+Windows ARM64

kyrax-1.0.2-cp310-abi3-win_amd64.whl (4.0 MB view details)

Uploaded CPython 3.10+Windows x86-64

kyrax-1.0.2-cp310-abi3-musllinux_1_2_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ x86-64

kyrax-1.0.2-cp310-abi3-musllinux_1_2_aarch64.whl (4.6 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

kyrax-1.0.2-cp310-abi3-manylinux_2_28_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ x86-64

kyrax-1.0.2-cp310-abi3-manylinux_2_28_aarch64.whl (4.4 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ ARM64

kyrax-1.0.2-cp310-abi3-macosx_11_0_arm64.whl (3.9 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

kyrax-1.0.2-cp310-abi3-macosx_10_12_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file kyrax-1.0.2.tar.gz.

File metadata

  • Download URL: kyrax-1.0.2.tar.gz
  • Upload date:
  • Size: 188.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for kyrax-1.0.2.tar.gz
Algorithm Hash digest
SHA256 a27de41d6748793352fa1365faf97df38d94028612d399ec3ed5b947f36d40b7
MD5 013b1d14ccc3b75e85cd33e953cfc050
BLAKE2b-256 55d5f625fdfe5de6093432408ee21c0dd36af8afa4f6db009fce675b890d7888

See more details on using hashes here.

File details

Details for the file kyrax-1.0.2-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: kyrax-1.0.2-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: CPython 3.14t, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for kyrax-1.0.2-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 b4620f20c0cc9d03f421ab8ab29b0a17ff3c687c16f74ba2da77afa2be96f6ea
MD5 7ebcd43a9569f65176f22dcdd4586785
BLAKE2b-256 74862d5c7af934402206d2bbf3ffcc61d6b8e97f54630586d1872fc5841c0bc1

See more details on using hashes here.

File details

Details for the file kyrax-1.0.2-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for kyrax-1.0.2-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 d481232f0aa9daffbcc39a86aa68dbfe25a949d0f2602824d8fd820f449b0248
MD5 eaff74e5c50551416bdb1ed7aadb07b4
BLAKE2b-256 460beb9ed431f0bca2ae6dae8add5b7d3198c1da01273230703d510fe7ebded1

See more details on using hashes here.

File details

Details for the file kyrax-1.0.2-cp314-cp314t-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for kyrax-1.0.2-cp314-cp314t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 50e39f94d36db7de2d26bd3fa5744239b09238e6f3945c52c8c4f045f5a87ab7
MD5 20eced4ed9681dd93eb4650f615493cf
BLAKE2b-256 dbaa8bbcbe9ab471933145faf4e9253947ae347177b691d6901b6fe3e6237a06

See more details on using hashes here.

File details

Details for the file kyrax-1.0.2-cp314-cp314t-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for kyrax-1.0.2-cp314-cp314t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ba3ea17eb70a40847c95f8280affb757bf24a6d47f23dabf32d8cf96a81b8f8a
MD5 3e5fdf4a9d29a7b669e78f4fa7927ddd
BLAKE2b-256 81719dfb18cb351c898d042b126f56e486c0c3f8096ab23dee3e68987e44118f

See more details on using hashes here.

File details

Details for the file kyrax-1.0.2-cp314-cp314t-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for kyrax-1.0.2-cp314-cp314t-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 bf0f64a9afcba35933fbbeac9ae778f608ce925a2bdc038075b88d46bb337670
MD5 1436f2950e43fabe4814a8c54ed308e3
BLAKE2b-256 86dfe31f1324528ab4f4300c44fc518dcdd6d4dd2baa45389ed6f2b9b7b92c4c

See more details on using hashes here.

File details

Details for the file kyrax-1.0.2-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for kyrax-1.0.2-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d5795b0515c728ae44b087fb21d60726d5577ad48e4d6510fc55cb6c8f50e64f
MD5 acac09176f6591f14611d6830d1b5473
BLAKE2b-256 db1e95359a3e11fb92b03dd0a63f79d0cd9a5cd8e5978cf92b81e87c73bc530b

See more details on using hashes here.

File details

Details for the file kyrax-1.0.2-cp314-cp314t-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for kyrax-1.0.2-cp314-cp314t-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 91ddf5740f1a83f2370326c1b15f0b5aa8f2b96764799bb216402020a153bb4f
MD5 211f5e11efddeb9a17b156efbe9e4dfe
BLAKE2b-256 af62caf725d281498d8b1a77302c093634796d674c82035180807bc5d148c0e8

See more details on using hashes here.

File details

Details for the file kyrax-1.0.2-cp310-abi3-win_arm64.whl.

File metadata

  • Download URL: kyrax-1.0.2-cp310-abi3-win_arm64.whl
  • Upload date:
  • Size: 3.7 MB
  • Tags: CPython 3.10+, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for kyrax-1.0.2-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 d03c48b49edb636bb4fda4a813da77ad71edc1f6912d2e00e96cddf33f0435c6
MD5 76bc538b9041b33b171fc21510b16d44
BLAKE2b-256 dd60184d0b4d70739f8a42a2a78cbf9bb18c54881624f1de38e6d9adc3765d14

See more details on using hashes here.

File details

Details for the file kyrax-1.0.2-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: kyrax-1.0.2-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 4.0 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.14.1

File hashes

Hashes for kyrax-1.0.2-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a43bdc0ba065d230ecfd7f57863128e485ad2b14702f221097d29bf27bef597f
MD5 3e5f5420fe359421d81b1029557c2836
BLAKE2b-256 fb3d5383b9a7c214a417d239580aa645c41f88352582eb0ba05ff115f071473a

See more details on using hashes here.

File details

Details for the file kyrax-1.0.2-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for kyrax-1.0.2-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 689ba693eb43270dd5a61291991598e7988456867e167000d0706eb6030c07c0
MD5 a4d41b4a068559461c2a7cf0d545f5c5
BLAKE2b-256 7f7b231b53a51898918d42771b3e97f54e1a22a268a00d996ab059082b834ff0

See more details on using hashes here.

File details

Details for the file kyrax-1.0.2-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for kyrax-1.0.2-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 599d0e6c76173d3db74b95698aa44d0d1d68d7689372081019508bd1c1a8a328
MD5 0d2d2ba0e22427c231463ebc7e2ceb26
BLAKE2b-256 969ca52e436e68a1ad08a491452a92d73513fef8808d6c1843674a5109b8d3ec

See more details on using hashes here.

File details

Details for the file kyrax-1.0.2-cp310-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for kyrax-1.0.2-cp310-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 be4d99246e8ba95ad1487eb5bf4ea411503df48e870f3e90a3c8f2bf0a4b1919
MD5 9f90dbc620711ec4359316f9402777e5
BLAKE2b-256 5767d64f6de58e4c8a25f5153d66bee36751bfff36ded58ebeff2abafd930036

See more details on using hashes here.

File details

Details for the file kyrax-1.0.2-cp310-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for kyrax-1.0.2-cp310-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 9084339447ae462c7500f18b27b81ba528a3bb48ddd00ce832a20eeeaf2aa4cd
MD5 b8c57e90e191f32ffbff06881b656e17
BLAKE2b-256 e802520f8e8115924118c4ff1136c4da06cd2fe53af92001b748bf30903c558e

See more details on using hashes here.

File details

Details for the file kyrax-1.0.2-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for kyrax-1.0.2-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1922602dace1b0125f0e2102f5b8896110c16f585167d54894dc4a27d079969d
MD5 79099584a9b3be669605e9bcc27100ae
BLAKE2b-256 81afb9ba7350f1669d82618746a428e9679e36261dfd7e61757b43dc93855ac2

See more details on using hashes here.

File details

Details for the file kyrax-1.0.2-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for kyrax-1.0.2-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 09cf1ca00724bc2ead741ab40e11226f0d1afc0be00d6b24e574e50d31921ca4
MD5 9e6669053bf87b93cdb3247f074291cf
BLAKE2b-256 569150bbcb47b72ae1d83c94d7063d2df1a7b10a7335256969992fb9f08bbf64

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page