Skip to main content

A high-performance Python library to read/write Excel 2010 xlsx/xlsm files

Project description

A high-performance, statically typed drop-in replacement for openpyxl.

fastpyxl reads and writes Excel 2010+ xlsx/xlsm/xltx/xltm files with the same API as openpyxl — just change your import:

# before
from openpyxl import Workbook, load_workbook

# after
from fastpyxl import Workbook, load_workbook

No other code changes required.

Performance

Benchmarked on a real-world 5.2 MB IMF/World Bank workbook (887,370 cells, 97k formulas). Median of 3 runs, Python 3.12:

Benchmark comparison: fastpyxl vs openpyxl

Operation

openpyxl

fastpyxl

Change

Load workbook

6.11s

5.08s

-16.9%

Save workbook

5.73s

5.42s

-5.4%

Read-only iteration

4.35s

4.03s

-7.4%

Further optimizations are in progress. See the open performance issues for the roadmap.

Installation

pip install fastpyxl

Quick start

from fastpyxl import Workbook

wb = Workbook()
ws = wb.active

ws["A1"] = 42
ws.append([1, 2, 3])

import datetime
ws["A2"] = datetime.datetime.now()

wb.save("sample.xlsx")

Key features

  • 1-to-1 API compatibility with openpyxl

  • Static typing throughout

  • Optimized cell parsing, coordinate lookups, and style deduplication

  • Read-only and write-only modes for large files

  • Charts, images, comments, data validation, pivot tables

  • Conditional formatting and rich text

  • Pandas DataFrame integration

Security

By default fastpyxl does not guard against quadratic blowup or billion laughs XML attacks. To guard against these attacks install defusedxml.

Documentation

Full documentation: https://fastpyxl.readthedocs.io

Acknowledgements

fastpyxl is a fork of openpyxl. All credit to Eric Gazoni, Charlie Clark, and the openpyxl contributors whose work this project builds upon.

License

MIT. See LICENSE for details.

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

fastpyxl-1.0.6.tar.gz (211.5 kB view details)

Uploaded Source

Built Distribution

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

fastpyxl-1.0.6-py3-none-any.whl (286.6 kB view details)

Uploaded Python 3

File details

Details for the file fastpyxl-1.0.6.tar.gz.

File metadata

  • Download URL: fastpyxl-1.0.6.tar.gz
  • Upload date:
  • Size: 211.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fastpyxl-1.0.6.tar.gz
Algorithm Hash digest
SHA256 c379f083d7b25ff621250139e21745b619b1edd0f765f7e81d99d55617e3f1a7
MD5 b1ec646b695f1a233e5197cfc37443cd
BLAKE2b-256 c1d09f9b8b9148b377865672d61818e3362cdc5fbbbd45f4cf24788cd5bcb7e3

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastpyxl-1.0.6.tar.gz:

Publisher: release.yml on Promptly-Technologies-LLC/fastpyxl

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fastpyxl-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: fastpyxl-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 286.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fastpyxl-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 c58e60f1df28a55e8b77a96a12f26a472d20ff0e9aa639f310f1fd4cbf862c4f
MD5 414e746dba62f44d3c2ae5a283db9c73
BLAKE2b-256 f46bffe7d172cea5e67f94f75a81b94b114b36ed5f9d1dae92153c89364e3542

See more details on using hashes here.

Provenance

The following attestation bundles were made for fastpyxl-1.0.6-py3-none-any.whl:

Publisher: release.yml on Promptly-Technologies-LLC/fastpyxl

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