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.3.tar.gz (212.4 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.3-cp314-cp314t-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.14tWindows x86-64

kyrax-1.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

kyrax-1.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl (4.7 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ ARM64

kyrax-1.0.3-cp314-cp314t-manylinux_2_28_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ x86-64

kyrax-1.0.3-cp314-cp314t-manylinux_2_28_aarch64.whl (4.5 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.28+ ARM64

kyrax-1.0.3-cp314-cp314t-macosx_11_0_arm64.whl (4.0 MB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

kyrax-1.0.3-cp314-cp314t-macosx_10_12_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.14tmacOS 10.12+ x86-64

kyrax-1.0.3-cp310-abi3-win_arm64.whl (3.8 MB view details)

Uploaded CPython 3.10+Windows ARM64

kyrax-1.0.3-cp310-abi3-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.10+Windows x86-64

kyrax-1.0.3-cp310-abi3-musllinux_1_2_x86_64.whl (4.9 MB view details)

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

kyrax-1.0.3-cp310-abi3-musllinux_1_2_aarch64.whl (4.7 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

kyrax-1.0.3-cp310-abi3-manylinux_2_28_x86_64.whl (4.6 MB view details)

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

kyrax-1.0.3-cp310-abi3-manylinux_2_28_aarch64.whl (4.5 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ ARM64

kyrax-1.0.3-cp310-abi3-macosx_11_0_arm64.whl (4.0 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

kyrax-1.0.3-cp310-abi3-macosx_10_12_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for kyrax-1.0.3.tar.gz
Algorithm Hash digest
SHA256 295d2d2716281e47e58d973e0ef2e4938f56a83c91116fe30de47e78e154323e
MD5 e71f98dfae5f37ea49b86e7a48607983
BLAKE2b-256 a2237ebc2a982736e700ccfbfa208b5678ddb1609ff716e8f174d5f54562374a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kyrax-1.0.3-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 4.1 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.3-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 0e7174a38006fffcf9f6702f09bfaea9f1ebdfb25b2ff5bd4f54068b8cd68edd
MD5 f66d4a186f051c55bc4f3bea4c2733a7
BLAKE2b-256 c3905806a56e3a085e4d08f0b29a11bc50067fe91451e444c7d099d2fedf5b59

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kyrax-1.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 5e43873e4a581b59e24bef4512879e97d517f6deaf812e4e5a3a448adb805ab9
MD5 2a0237c98d99cd2a1cf6eec526b0da84
BLAKE2b-256 2e9416995b652ea2e33149e2fe98e191e3c74a8ae07dfa0cc4e3e12f0d4d1e1a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kyrax-1.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 73c11207c9f76b6d25e97c6efe40efbcc388aed7c81d85b5197394f47fe7e05c
MD5 b941681a14b8076cf6b290b15be99586
BLAKE2b-256 f03315d5bafb6b74bf9839af4054ae4b0a4ecd4d5f6a169a1d513c97083e5237

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kyrax-1.0.3-cp314-cp314t-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7fff9f3203807a35e71cd86ee6662c7b4fde8cb15fd6395f970dd4d924380786
MD5 02fe1b648b5f057bca4c8502615e749f
BLAKE2b-256 fca8d12e48fd7edd2dbf0fc077d6a96692db901119d3fe7b2e0dde4dcaa92795

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kyrax-1.0.3-cp314-cp314t-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 fb73e3dae8b498cdc48820c5558e389c151c68bfffb533777c3e751a539fd74d
MD5 f90a33cf1a245e36b4b69425a51625e6
BLAKE2b-256 4c3f7abd643d60447972109608bae316492bd7ad94261d92b6751e565bcc32ea

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kyrax-1.0.3-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c3a94835817c9e19a213cf73f73ca230cfe9f36873f6f265c101e10ef1b0cf98
MD5 04db815d5fe2b8b6895895893b2fae5c
BLAKE2b-256 e9318e5198e3ef28455412fa9af187915e81b90d8fe1dfd6f9aca31f27a7d508

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kyrax-1.0.3-cp314-cp314t-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3d272524e6b4a3228329641f0d0d9cad1a167742db41278aebc38d354724cbac
MD5 c0e73e9cf879edcda2d7b4cee2f8758f
BLAKE2b-256 a14ed3d80336a21ed0ab29af359c62abf62726054cd50768e0cf04ae10332aa3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kyrax-1.0.3-cp310-abi3-win_arm64.whl
  • Upload date:
  • Size: 3.8 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.3-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 a07c6ed6785569b41bed074acad7d202cc2d7d2ca62f715e8ff49099552b587c
MD5 0637932dec099d2afb309b4f0c59f276
BLAKE2b-256 8701ff9069d7d42c98d035c3bf5735767aa304e5dd810099ffcf64a6235da740

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kyrax-1.0.3-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 4.1 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.3-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 1a735f8c08590eb6c63f943289fd6d61b9df545b2b6c3b9fb1f809922407fb02
MD5 ebffa05e17d650d647514d64c29e63ce
BLAKE2b-256 e3e9dbacf4813cf93306fecf5658f806638dae1077e65854992a344dbfffa88c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kyrax-1.0.3-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 4dcd8a901c8952ae86304999ad0285e7ef3591afc34ec35447af271c22d9f986
MD5 ac07ce2416378924024d2f00c6ad4646
BLAKE2b-256 e026729f23e7d27f710f137c5712ebce544c92066af2ec6911bbb6a3ba3c8c63

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kyrax-1.0.3-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 a512067431fbbe266d0815ee25e7292c114fa3169fc601e41527ae25c99cdef8
MD5 35bc4b9193484e05e1379eb146edbf3c
BLAKE2b-256 ea6e45e82366c4145e4a67d78c57f0894611f174b47cacb13ca529427b6715be

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kyrax-1.0.3-cp310-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c719a68a6f47d4659c3cf23ae0d12ba44b09b26720f496e3b4d627630c1189bb
MD5 33ed889c14eb019d9e0c90db5918415d
BLAKE2b-256 bf8b04d6b4338b412b6a0fbe637b6e5daf3010dd59bda102bd6c24b5c387e4fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kyrax-1.0.3-cp310-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2efe32e209a283413c527822a6d24e9c6f097baeb6023507ad97c9dbce58c2f7
MD5 04fe9e9242fe5b1e3a5c3b843d5f1859
BLAKE2b-256 9f2001f048918dad3b807614dffa1a4e371caf8e2fce5eff4fc0373039f8578c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kyrax-1.0.3-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c50d3e10ce9c69537a8fa041521b0fcc55f9852fa1b95f3ce34230681f163fd5
MD5 9ab46231f275feb6880eeccca427e944
BLAKE2b-256 bcf65d4989a96689cdb6cdb7756ffba83151e17b2e573f9fa4259a8a77c0cc8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kyrax-1.0.3-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d6d40a6ace725a0d925f723a01866888a8c6ffcfd5094e9dcef6221240caa9c8
MD5 0c4676ffee790f8706e6f7bd269509ba
BLAKE2b-256 0a85b196116035d20ccd856b713e67f00dd30ba480cf88da0bf47895a35d936b

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