Skip to main content

fastexcel

A fast excel file reader for Python and Rust.

Docs:

Stability

The Python library is considered production-ready. The API is mostly stable, and we avoid breaking changes as much as possible. v1.0.0 will be released once the milestone is reached.

⚠️ 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 fastexcel

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

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

# With PyArrow support
pip install fastexcel[pyarrow]

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

Quick Start

Modern usage (recommended)

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

import fastexcel

# Load an Excel file
reader = fastexcel.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 fastexcel

reader = fastexcel.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 = fastexcel.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 https://github.com/ToucanToco/fastexcel.git
cd fastexcel

# 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

Release files for fastexcel 0.21.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 fastexcel 0.21.0
File Size Uploaded
fastexcel-0.21.0.tar.gz 61.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for fastexcel 0.21.0
File
fastexcel-0.21.0-cp314-cp314t-win_amd64.whl CPython 3.14 CPython 3.14 free-threading Windows x86-64 Details
fastexcel-0.21.0-cp314-cp314t-musllinux_1_2_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64 Details
fastexcel-0.21.0-cp314-cp314t-musllinux_1_2_aarch64.whl CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ ARM64 Details
fastexcel-0.21.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64 Details
fastexcel-0.21.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64 Details
fastexcel-0.21.0-cp314-cp314t-macosx_11_0_arm64.whl CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64 Details
fastexcel-0.21.0-cp314-cp314t-macosx_10_12_x86_64.whl CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64 Details
fastexcel-0.21.0-cp310-abi3-win_arm64.whl CPython 3.10 abi3 Windows ARM64 Details
fastexcel-0.21.0-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details
fastexcel-0.21.0-cp310-abi3-musllinux_1_2_x86_64.whl CPython 3.10 abi3 Linux musl 1.2+ x86-64 Details
fastexcel-0.21.0-cp310-abi3-musllinux_1_2_aarch64.whl CPython 3.10 abi3 Linux musl 1.2+ ARM64 Details
fastexcel-0.21.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 abi3 Linux glibc 2.17+ x86-64 Details
fastexcel-0.21.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.10 abi3 Linux glibc 2.17+ ARM64 Details
fastexcel-0.21.0-cp310-abi3-macosx_11_0_arm64.whl CPython 3.10 abi3 macOS 11.0+ ARM64 Details
fastexcel-0.21.0-cp310-abi3-macosx_10_12_x86_64.whl CPython 3.10 abi3 macOS 10.12+ x86-64 Details

Total release size: 54.0 MB

Release files / fastexcel-0.21.0.tar.gz

Download URL fastexcel-0.21.0.tar.gz
Size 61.0 kB
Tags Source
SHA-256 checksum
How to use checksums
07313c1267ab47ba639abf1122efd5985a1fb08efc996194f422ab17f06149c5
BLAKE2b-256 checksum
How to use checksums
ab16d3b4465e1c32736ada7e1bc5a11334f3b38d747074aa01c60877d01dff81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / fastexcel-0.21.0-cp314-cp314t-win_amd64.whl

Download URL fastexcel-0.21.0-cp314-cp314t-win_amd64.whl
Size 3.3 MB
Tags CPython 3.14 CPython 3.14 free-threading Windows x86-64
SHA-256 checksum
How to use checksums
fe52f6053aac6ff3b8cc879052b671af9cb3ada16853b1c8b4bcac44574e4c10
BLAKE2b-256 checksum
How to use checksums
13904b2614123e185f20e386695771898c97a469f39129472db731a2c3d248ad
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / fastexcel-0.21.0-cp314-cp314t-musllinux_1_2_x86_64.whl

Download URL fastexcel-0.21.0-cp314-cp314t-musllinux_1_2_x86_64.whl
Size 4.0 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
1a5742e598516734740ef4142cf3328d6ef6c8e43947d9a66d6a91a5d9bfa3ec
BLAKE2b-256 checksum
How to use checksums
a7ff23f43ec08ac44a02798508593f2af5c84bbad58db17da3237428577f5b1b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / fastexcel-0.21.0-cp314-cp314t-musllinux_1_2_aarch64.whl

Download URL fastexcel-0.21.0-cp314-cp314t-musllinux_1_2_aarch64.whl
Size 3.9 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ ARM64
SHA-256 checksum
How to use checksums
bce27f751cf1661f823088e89c11375448d19e425e3c3aa993c356720305c873
BLAKE2b-256 checksum
How to use checksums
d1e83d9626a0b1e50704bfc19df2f69e2b3e7870f43e6cd8509565b5aa32e5b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / fastexcel-0.21.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL fastexcel-0.21.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.8 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
47c6f42b3b82a158e4e6c4e1ed53ba0b96cec132d1fed828c8411e6f6ba5caab
BLAKE2b-256 checksum
How to use checksums
ac47b768f8165e16f15345b5eec06507b33e88cc8934d5e9d0e602d26bfdba8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / fastexcel-0.21.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL fastexcel-0.21.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 3.7 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ ARM64
SHA-256 checksum
How to use checksums
6f8fdbfd80647714a2b3d49de2517d0466f6c046aa215c16fb569c48aef8d0ee
BLAKE2b-256 checksum
How to use checksums
7c0dfce85550c9138e5e2517b33d9ec000222710b3bdc6563a6c91fddff3eb52
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / fastexcel-0.21.0-cp314-cp314t-macosx_11_0_arm64.whl

Download URL fastexcel-0.21.0-cp314-cp314t-macosx_11_0_arm64.whl
Size 3.3 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
ef2a6953e8350966d32632e3bc064edaab64ea2899f2027e564269fa7d75fb58
BLAKE2b-256 checksum
How to use checksums
e482763ecd88db11d6f98b78aa1b951c2a259d84d6d285af2f6dd525948062f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / fastexcel-0.21.0-cp314-cp314t-macosx_10_12_x86_64.whl

Download URL fastexcel-0.21.0-cp314-cp314t-macosx_10_12_x86_64.whl
Size 3.4 MB
Tags CPython 3.14 CPython 3.14 free-threading macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
f6cf28f5f3fed1f34aa15bf021d2c04bf947720df70f54b131258c913bc3b4cf
BLAKE2b-256 checksum
How to use checksums
749def3dd2022d943620653f65fd160f81be27c576a54b9ecd26cd1731da365b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / fastexcel-0.21.0-cp310-abi3-win_arm64.whl

Download URL fastexcel-0.21.0-cp310-abi3-win_arm64.whl
Size 3.0 MB
Tags CPython 3.10 Windows ARM64 abi3
SHA-256 checksum
How to use checksums
86af0a1e3c3d8657916ea434f11636df4e4b49e0cf665b4ea39349a83d4ca3c8
BLAKE2b-256 checksum
How to use checksums
f3035c8c97b47289bead5a3ba0b6cba01d27377b857446c65918c43e1b008d94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / fastexcel-0.21.0-cp310-abi3-win_amd64.whl

Download URL fastexcel-0.21.0-cp310-abi3-win_amd64.whl
Size 3.3 MB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
e1db4666a0790b48c76bb5a43cda06ffecebb22706f9ac6b3f07bcb0e7336134
BLAKE2b-256 checksum
How to use checksums
8a886879abe39db93b2c1939fe146d1335d95c30e961c2807f5bc516d4e305e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / fastexcel-0.21.0-cp310-abi3-musllinux_1_2_x86_64.whl

Download URL fastexcel-0.21.0-cp310-abi3-musllinux_1_2_x86_64.whl
Size 4.0 MB
Tags CPython 3.10 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
e919a4eaa15330341744cfee33d1f87d041d08228ce68809790e3738e80811e8
BLAKE2b-256 checksum
How to use checksums
6d684f0d0b5d41c9fe22d45ec2b8412566cb79fbd4f412b6f33a7f60a302c1e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / fastexcel-0.21.0-cp310-abi3-musllinux_1_2_aarch64.whl

Download URL fastexcel-0.21.0-cp310-abi3-musllinux_1_2_aarch64.whl
Size 3.9 MB
Tags CPython 3.10 Linux musl 1.2+ ARM64 abi3
SHA-256 checksum
How to use checksums
0376944edf90c98008b49b200f7354122ba9abac6c21bab76487655738b041b7
BLAKE2b-256 checksum
How to use checksums
5db21e08ffca9481fa2103409a9bef52a91f0963867b4ea649a3d9e8f5c45554
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / fastexcel-0.21.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL fastexcel-0.21.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.8 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
9ddb458fecbbf1804c0952155fb99d18025d86e345b57a5435e0553944f25578
BLAKE2b-256 checksum
How to use checksums
30b82f5de2ec4026aa2e121a5da3d25b1d20f653bffdd569dfb74df6732ab99d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / fastexcel-0.21.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL fastexcel-0.21.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 3.7 MB
Tags CPython 3.10 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
3c6e66906fe3b9f68f94c4c94e2ac21b6eebd862b703983c8e0c009f91c71754
BLAKE2b-256 checksum
How to use checksums
a8a127454838aca7921826dd02be3828a20fcaaa36e641762bf070642c8ad65e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / fastexcel-0.21.0-cp310-abi3-macosx_11_0_arm64.whl

Download URL fastexcel-0.21.0-cp310-abi3-macosx_11_0_arm64.whl
Size 3.3 MB
Tags CPython 3.10 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
768b663728cb5f29e159428fdf3a3f74e379534c2f0304b300bd95039d482abe
BLAKE2b-256 checksum
How to use checksums
69ffa6b1b97a94bbcc0d64b946e831ff937c2c803b019a7600fc69f953c38370
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / fastexcel-0.21.0-cp310-abi3-macosx_10_12_x86_64.whl

Download URL fastexcel-0.21.0-cp310-abi3-macosx_10_12_x86_64.whl
Size 3.4 MB
Tags CPython 3.10 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
c3e7ab5d8c8b6c5a787aaf2b64604bd8b93b94694920a2ed731ea556a81d9a35
BLAKE2b-256 checksum
How to use checksums
9498461c22faa286d7635343fcfbacbed4edf77d98f06fb4426e646ae5438d66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release history Release notifications | RSS feed

This release

0.21.0 This release

16 release files

0.16.0

6 release files

0.14.0

6 release files

0.13.0

6 release files

0.12.1

6 release files

0.12.0

6 release files

0.11.6

5 release files

0.11.5

5 release files

0.11.3

5 release files

0.11.2

4 release files

0.11.1

4 release files

0.11.0

4 release files

0.10.2

5 release files

0.10.1

5 release files

0.10.0

3 release files

0.9.1

15 release files

0.9.0

15 release files

0.7.0

10 release files

0.6.0

6 release files

0.5.0

4 release files

0.4.2

4 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

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