pyfastexcel
This package enables high-performance Excel writing by integrating with the streaming API from the golang package excelize. Users can leverage this functionality without the need to write any Go code, as the entire process can be accomplished through Python.
Features
-
Python and Golang Integration: Seamlessly call Golang built shared libraries from Python.
-
No Golang Code Required: Users can solely rely on Python for Excel file generation, eliminating the need for Golang expertise.
Installation
Install via pip (Recommended)
You can easily install the package via pip
pip install pyfastexcel
Install manually
If you prefer to build the package manually, follow these steps:
-
Clone the repository:
git clone https://github.com/Zncl2222/pyfastexcel.git
-
Go to the project root directory:
cd pyfastexcel
-
Install the required golang packages:
go mod download
-
Build the Golang shared library using the Makefile:
make
-
Install the required python packages:
pip install -r requirements.txt
or
pipenv install -
Import the project and start using it!
Requirements
| Operating System | Version |
|---|---|
| Linux | Ubuntu 18.04 or higher |
| macOS | macOS 13 (x86-64) |
| Windows | Windows 10 or higher |
Python Versions
- Python 3.8 or higher
For earlier versions of Python or other operating systems, compatibility is not guaranteed.
Usage
The index assignment is now avaliable in Workbook and the StreamWriter.
Here is the example usage:
from pyfastexcel import Workbook
from pyfastexcel.utils import set_custom_style
from pyfastexcel import CustomStyle
if __name__ == '__main__':
# Workbook
wb = Workbook()
# Set and register CustomStyle
bold_style = CustomStyle(font_size=15, font_bold=True)
set_custom_style('bold_style', bold_style)
ws = wb['Sheet1']
# Write value with default style
ws['A1'] = 'A1 value'
# Write value with custom style
ws['B1'] = ('B1 value', 'bold_style')
# Write value in slice with default style
ws['A2': 'C2'] = [1, 2, 3]
# Write value in slice with custom style
ws['A3': 'C3'] = [(1, 'bold_style'), (2, 'bold_style'), (3, 'bold_style')]
# Write value by row with default style (python index 0 is the index 1 in excel)
ws[3] = [9, 8, 'go']
# Write value by row with custom style
ws[4] = [(9, 'bold_style'), (8, 'bold_style'), ('go', 'bold_style')]
# Send request to golang lib and create excel
wb.read_lib_and_create_excel()
# File path to save
file_path = 'pyexample_workbook.xlsx'
wb.save(file_path)
For row-by-row Excel writing, consider using StreamWriter, a
subclass of Workbook. This class is optimized for streaming large datasets.
Learn more in the StreamWriter documentation.
Explore additional examples in the FullExamples.
Documentation
The documentation is hosted on Read the Docs.
Benchmark
The following result displays the performance comparison between
pyfastexcel and openpyxl for writing 50000 rows with 30
columns (Total 1500000 cells). To see more benchmark results, please
see the benchmark.
How it Works
The core functionality revolves around encoding Excel cell data and styles, or any other Excel properties, into a JSON string within Python. This JSON payload is then passed through ctypes to a Golang shared library. In Golang, the JSON is parsed, and using the streaming writer of excelize to wrtie excel in high performance.
Metadata
Release files for pyfastexcel 0.1.9
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyfastexcel-0.1.9-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| pyfastexcel-0.1.9-py3-none-manylinux2014_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details |
| pyfastexcel-0.1.9-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
Total release size: 10.7 MB
Release files / pyfastexcel-0.1.9-py3-none-win_amd64.whl
| Download URL | pyfastexcel-0.1.9-py3-none-win_amd64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ae9f0bc11b2ad1dc0515af04b69d1005d42e175e9ac458ddad82e26298359c5f
|
|
BLAKE2b-256 checksum How to use checksums |
6e0d872ec1268c3f9a8a977d8507a1fec4369c47b75a6d3f3b7cc65b0bde1238
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 10, 2026.
Transparency logRelease files / pyfastexcel-0.1.9-py3-none-manylinux2014_x86_64.whl
| Download URL | pyfastexcel-0.1.9-py3-none-manylinux2014_x86_64.whl |
|---|---|
| Size | 4.2 MB |
| Tags | Linux glibc 2.17+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
0c44500e3e90346100de37b4ef0bacfc62df887931d52fce45a3bb3b1f0418c6
|
|
BLAKE2b-256 checksum How to use checksums |
7dcdd327f8029cd579a7688aee3e64581bce542a2a983ddd61e8e137f02a01a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 10, 2026.
Transparency logRelease files / pyfastexcel-0.1.9-py3-none-macosx_11_0_arm64.whl
| Download URL | pyfastexcel-0.1.9-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 2.4 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
ccd854db29872f8286bbad3750f49807834a1d86bcd8e69f4c6dbd5c394b64a0
|
|
BLAKE2b-256 checksum How to use checksums |
2f06dd014ed3b460033389eea511878cbcc932b5b670a05ac2ffd4b4e0af1f6c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 10, 2026.
Transparency log