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

Download files

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

Source Distribution

fastexcel-0.21.0.tar.gz (61.0 kB view details)

Uploaded Source

Built Distributions

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

fastexcel-0.21.0-cp314-cp314t-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.14tWindows x86-64

fastexcel-0.21.0-cp314-cp314t-musllinux_1_2_x86_64.whl (4.0 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

fastexcel-0.21.0-cp314-cp314t-musllinux_1_2_aarch64.whl (3.9 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ ARM64

fastexcel-0.21.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.17+ x86-64

fastexcel-0.21.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.7 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.17+ ARM64

fastexcel-0.21.0-cp314-cp314t-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

fastexcel-0.21.0-cp314-cp314t-macosx_10_12_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.14tmacOS 10.12+ x86-64

fastexcel-0.21.0-cp310-abi3-win_arm64.whl (3.0 MB view details)

Uploaded CPython 3.10+Windows ARM64

fastexcel-0.21.0-cp310-abi3-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.10+Windows x86-64

fastexcel-0.21.0-cp310-abi3-musllinux_1_2_x86_64.whl (4.0 MB view details)

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

fastexcel-0.21.0-cp310-abi3-musllinux_1_2_aarch64.whl (3.9 MB view details)

Uploaded CPython 3.10+musllinux: musl 1.2+ ARM64

fastexcel-0.21.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.8 MB view details)

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

fastexcel-0.21.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (3.7 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

fastexcel-0.21.0-cp310-abi3-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

fastexcel-0.21.0-cp310-abi3-macosx_10_12_x86_64.whl (3.4 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file fastexcel-0.21.0.tar.gz.

File metadata

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

File hashes

Hashes for fastexcel-0.21.0.tar.gz
Algorithm Hash digest
SHA256 07313c1267ab47ba639abf1122efd5985a1fb08efc996194f422ab17f06149c5
MD5 00be4d6050e1f9060e50a032955638e1
BLAKE2b-256 ab16d3b4465e1c32736ada7e1bc5a11334f3b38d747074aa01c60877d01dff81

See more details on using hashes here.

File details

Details for the file fastexcel-0.21.0-cp314-cp314t-win_amd64.whl.

File metadata

File hashes

Hashes for fastexcel-0.21.0-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 fe52f6053aac6ff3b8cc879052b671af9cb3ada16853b1c8b4bcac44574e4c10
MD5 dea98fd327dffdd7b5d43bedbfa32c15
BLAKE2b-256 13904b2614123e185f20e386695771898c97a469f39129472db731a2c3d248ad

See more details on using hashes here.

File details

Details for the file fastexcel-0.21.0-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for fastexcel-0.21.0-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 1a5742e598516734740ef4142cf3328d6ef6c8e43947d9a66d6a91a5d9bfa3ec
MD5 25c262a88eb7b93d3993a94c94030cc1
BLAKE2b-256 a7ff23f43ec08ac44a02798508593f2af5c84bbad58db17da3237428577f5b1b

See more details on using hashes here.

File details

Details for the file fastexcel-0.21.0-cp314-cp314t-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for fastexcel-0.21.0-cp314-cp314t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 bce27f751cf1661f823088e89c11375448d19e425e3c3aa993c356720305c873
MD5 b7f5f9fc69c0977a20aa89c3edfbe546
BLAKE2b-256 d1e83d9626a0b1e50704bfc19df2f69e2b3e7870f43e6cd8509565b5aa32e5b6

See more details on using hashes here.

File details

Details for the file fastexcel-0.21.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastexcel-0.21.0-cp314-cp314t-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 47c6f42b3b82a158e4e6c4e1ed53ba0b96cec132d1fed828c8411e6f6ba5caab
MD5 38d6e803d0b4cc9e2a412e13e1d5017f
BLAKE2b-256 ac47b768f8165e16f15345b5eec06507b33e88cc8934d5e9d0e602d26bfdba8a

See more details on using hashes here.

File details

Details for the file fastexcel-0.21.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fastexcel-0.21.0-cp314-cp314t-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 6f8fdbfd80647714a2b3d49de2517d0466f6c046aa215c16fb569c48aef8d0ee
MD5 51ddc0f4b142df87d1ad4e8e230bf305
BLAKE2b-256 7c0dfce85550c9138e5e2517b33d9ec000222710b3bdc6563a6c91fddff3eb52

See more details on using hashes here.

File details

Details for the file fastexcel-0.21.0-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastexcel-0.21.0-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ef2a6953e8350966d32632e3bc064edaab64ea2899f2027e564269fa7d75fb58
MD5 59a8da9285aaaa1224f9f5a4ca84f14a
BLAKE2b-256 e482763ecd88db11d6f98b78aa1b951c2a259d84d6d285af2f6dd525948062f4

See more details on using hashes here.

File details

Details for the file fastexcel-0.21.0-cp314-cp314t-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fastexcel-0.21.0-cp314-cp314t-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f6cf28f5f3fed1f34aa15bf021d2c04bf947720df70f54b131258c913bc3b4cf
MD5 49967848c8f9e00358ca35669a256efe
BLAKE2b-256 749def3dd2022d943620653f65fd160f81be27c576a54b9ecd26cd1731da365b

See more details on using hashes here.

File details

Details for the file fastexcel-0.21.0-cp310-abi3-win_arm64.whl.

File metadata

File hashes

Hashes for fastexcel-0.21.0-cp310-abi3-win_arm64.whl
Algorithm Hash digest
SHA256 86af0a1e3c3d8657916ea434f11636df4e4b49e0cf665b4ea39349a83d4ca3c8
MD5 b3c955d7a7922107c6d5fbce1841a580
BLAKE2b-256 f3035c8c97b47289bead5a3ba0b6cba01d27377b857446c65918c43e1b008d94

See more details on using hashes here.

File details

Details for the file fastexcel-0.21.0-cp310-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for fastexcel-0.21.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 e1db4666a0790b48c76bb5a43cda06ffecebb22706f9ac6b3f07bcb0e7336134
MD5 988eb8c346e3da5dfa01ca1febf777ca
BLAKE2b-256 8a886879abe39db93b2c1939fe146d1335d95c30e961c2807f5bc516d4e305e1

See more details on using hashes here.

File details

Details for the file fastexcel-0.21.0-cp310-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for fastexcel-0.21.0-cp310-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 e919a4eaa15330341744cfee33d1f87d041d08228ce68809790e3738e80811e8
MD5 481041992295c9bcd9a902f3af615140
BLAKE2b-256 6d684f0d0b5d41c9fe22d45ec2b8412566cb79fbd4f412b6f33a7f60a302c1e8

See more details on using hashes here.

File details

Details for the file fastexcel-0.21.0-cp310-abi3-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for fastexcel-0.21.0-cp310-abi3-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 0376944edf90c98008b49b200f7354122ba9abac6c21bab76487655738b041b7
MD5 cf93e8497217fb1ff0c8862367ed2281
BLAKE2b-256 5db21e08ffca9481fa2103409a9bef52a91f0963867b4ea649a3d9e8f5c45554

See more details on using hashes here.

File details

Details for the file fastexcel-0.21.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fastexcel-0.21.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9ddb458fecbbf1804c0952155fb99d18025d86e345b57a5435e0553944f25578
MD5 3e3dd2603f83689bcb5cf2ca18b99e34
BLAKE2b-256 30b82f5de2ec4026aa2e121a5da3d25b1d20f653bffdd569dfb74df6732ab99d

See more details on using hashes here.

File details

Details for the file fastexcel-0.21.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for fastexcel-0.21.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 3c6e66906fe3b9f68f94c4c94e2ac21b6eebd862b703983c8e0c009f91c71754
MD5 9b72461faa4071980fcdbb009c4f0a10
BLAKE2b-256 a8a127454838aca7921826dd02be3828a20fcaaa36e641762bf070642c8ad65e

See more details on using hashes here.

File details

Details for the file fastexcel-0.21.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fastexcel-0.21.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 768b663728cb5f29e159428fdf3a3f74e379534c2f0304b300bd95039d482abe
MD5 a418e1f98adab5c327f4b629ad090c71
BLAKE2b-256 69ffa6b1b97a94bbcc0d64b946e831ff937c2c803b019a7600fc69f953c38370

See more details on using hashes here.

File details

Details for the file fastexcel-0.21.0-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for fastexcel-0.21.0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c3e7ab5d8c8b6c5a787aaf2b64604bd8b93b94694920a2ed731ea556a81d9a35
MD5 0ec1c3ceff5cb656aab9c1e10882998a
BLAKE2b-256 9498461c22faa286d7635343fcfbacbed4edf77d98f06fb4426e646ae5438d66

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.21.0 This release

16 files

0.20.2

16 files

0.20.1

12 files

0.19.0

11 files

0.18.0

11 files

0.17.2

11 files

0.17.1

11 files

0.16.0

6 files

0.15.1

6 files

0.15.0

6 files

0.14.0

6 files

0.13.0

6 files

0.12.1

6 files

0.12.0

6 files

0.11.6

5 files

0.11.5

5 files

0.11.3

5 files

0.11.2

4 files

0.11.1

4 files

0.11.0

4 files

0.10.4

5 files

0.10.3

5 files

0.10.2

5 files

0.10.1

5 files

0.10.0

3 files

0.9.1

15 files

0.9.0

15 files

0.8.0

15 files

0.7.0

10 files

0.6.0

6 files

0.5.0

4 files

0.4.2

4 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.3

2 files

Supported by

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