neatxlsx
neatxlsx is an opinionated XLSX report-table writer for Polars. It turns
DataFrames and streaming LazyFrames into consistently formatted workbooks while
keeping multi-row headers, freeze panes, large/wide-table splitting, and
transactional delivery behind one small API.
Installation
pip install neatxlsx
Python 3.11 or newer and Polars 1.38.1 or newer are required.
Quick start
import neatxlsx as nx
import polars as pl
data = pl.DataFrame(
{
"Sample": ["A", "B"],
"Count": [12, 18],
"Score": [0.125, 0.375],
}
)
with nx.Workbook("report.xlsx") as workbook:
workbook.write_sheet(
data,
"Results",
integer_columns="Count",
decimal_columns="Score",
freeze_columns=1,
)
Workbook writes to a sibling temporary file. Normal context-manager exit
atomically replaces the target where the filesystem supports atomic rename;
exceptional exit discards the temporary workbook and leaves an existing target
untouched.
Formats and policies
import neatxlsx as nx
import polars.selectors as cs
with nx.Workbook(
"report.xlsx",
header_format=nx.Format(bg_color="#D9EAF7"),
decimal_format=nx.Format(num_format="0.000"),
) as workbook:
workbook.write_sheet(
data,
"Results",
integer_columns=cs.integer(),
decimal_columns=cs.float(),
autofit=nx.Autofit(mode="all", max_rows=10_000),
scientific_notation=nx.ScientificNotation(scope="decimal"),
)
Column arguments accept one name/index, an ordered sequence, or a Polars
selector. Explicit integer and decimal selections override inferred roles for
those columns; other columns remain inferred unless the matching infer_*
option is disabled.
Large workbooks
ZIP64 is enabled by default because XLSX size depends on uncompressed worksheet
XML and cannot be predicted reliably before streaming. Use
nx.Workbook(..., use_zip64=False) only when a downstream reader lacks ZIP64
support. Autofit(mode="header") and "none" preserve a single LazyFrame
evaluation; "body" and "all" evaluate it twice.
See the documentation map for the complete API, lifecycle, testing, and release contracts.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file neatxlsx-0.1.0.tar.gz.
File metadata
- Download URL: neatxlsx-0.1.0.tar.gz
- Upload date:
- Size: 63.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6462f57da4f4b3d95fe590140fb7c2c36a4cc601b0451decb28a589dcb1d9dfb
|
|
| MD5 |
870c3ce6f2b4c43041aeca25226cb9eb
|
|
| BLAKE2b-256 |
887e36e24a914459955bff7e965cf0819c2add31bb01e220399618daa60c8b8f
|
Provenance
The following attestation bundles were made for neatxlsx-0.1.0.tar.gz:
Publisher:
publish.yml on FuqingZh/neatxlsx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
neatxlsx-0.1.0.tar.gz -
Subject digest:
6462f57da4f4b3d95fe590140fb7c2c36a4cc601b0451decb28a589dcb1d9dfb - Sigstore transparency entry: 2363369866
- Sigstore integration time:
-
Permalink:
FuqingZh/neatxlsx@1cbf5cdcdb6d1e52f1430acbb8118f68679927f2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/FuqingZh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1cbf5cdcdb6d1e52f1430acbb8118f68679927f2 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file neatxlsx-0.1.0-cp311-abi3-win_amd64.whl.
File metadata
- Download URL: neatxlsx-0.1.0-cp311-abi3-win_amd64.whl
- Upload date:
- Size: 5.1 MB
- Tags: CPython 3.11+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d2e97ff0488de00186d9609d0234906cbb6e2f8ace04d11367c4fdf361fa7ec
|
|
| MD5 |
5852696bcb53e80c2b51b185318a7344
|
|
| BLAKE2b-256 |
36d83f89ce33e9bd80f921524d311976fa8b7f83af2a1ba204a28dbb5fe47457
|
Provenance
The following attestation bundles were made for neatxlsx-0.1.0-cp311-abi3-win_amd64.whl:
Publisher:
publish.yml on FuqingZh/neatxlsx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
neatxlsx-0.1.0-cp311-abi3-win_amd64.whl -
Subject digest:
2d2e97ff0488de00186d9609d0234906cbb6e2f8ace04d11367c4fdf361fa7ec - Sigstore transparency entry: 2363370851
- Sigstore integration time:
-
Permalink:
FuqingZh/neatxlsx@1cbf5cdcdb6d1e52f1430acbb8118f68679927f2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/FuqingZh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1cbf5cdcdb6d1e52f1430acbb8118f68679927f2 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file neatxlsx-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: neatxlsx-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 5.5 MB
- Tags: CPython 3.11+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10a0c7036b9a3f15cd02b9b6571b9f3931bd2278f623fff6d227e647a0413aff
|
|
| MD5 |
bc2823cd7bbb586ce272e592bd9d3434
|
|
| BLAKE2b-256 |
0241b13e0afc5391f5f8a59d030532aa0e079d237916af07cfea13af5c5380fb
|
Provenance
The following attestation bundles were made for neatxlsx-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl:
Publisher:
publish.yml on FuqingZh/neatxlsx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
neatxlsx-0.1.0-cp311-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
10a0c7036b9a3f15cd02b9b6571b9f3931bd2278f623fff6d227e647a0413aff - Sigstore transparency entry: 2363370127
- Sigstore integration time:
-
Permalink:
FuqingZh/neatxlsx@1cbf5cdcdb6d1e52f1430acbb8118f68679927f2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/FuqingZh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1cbf5cdcdb6d1e52f1430acbb8118f68679927f2 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file neatxlsx-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: neatxlsx-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 5.2 MB
- Tags: CPython 3.11+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb8a979b56b129e01beb655d7f4bfd5d87afffbf5afac3601fad52e4e0878083
|
|
| MD5 |
1cc2cfaa0b09a922c563fef786ac6146
|
|
| BLAKE2b-256 |
e60347f0242727c4252e78a3c7afecca9b80793f8f8834959060389c126f6e68
|
Provenance
The following attestation bundles were made for neatxlsx-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl:
Publisher:
publish.yml on FuqingZh/neatxlsx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
neatxlsx-0.1.0-cp311-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
cb8a979b56b129e01beb655d7f4bfd5d87afffbf5afac3601fad52e4e0878083 - Sigstore transparency entry: 2363370485
- Sigstore integration time:
-
Permalink:
FuqingZh/neatxlsx@1cbf5cdcdb6d1e52f1430acbb8118f68679927f2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/FuqingZh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1cbf5cdcdb6d1e52f1430acbb8118f68679927f2 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file neatxlsx-0.1.0-cp311-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: neatxlsx-0.1.0-cp311-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 4.7 MB
- Tags: CPython 3.11+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
429b7db1b5eb44c3efb66201c7eecc9e1cca93aa0a92cd239339ecb25b040e44
|
|
| MD5 |
30c84830239c27213df59192c9853ad1
|
|
| BLAKE2b-256 |
03c9236dab9837464de28e844499dc6827a059b67107540b8ddc5186fa791afe
|
Provenance
The following attestation bundles were made for neatxlsx-0.1.0-cp311-abi3-macosx_11_0_arm64.whl:
Publisher:
publish.yml on FuqingZh/neatxlsx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
neatxlsx-0.1.0-cp311-abi3-macosx_11_0_arm64.whl -
Subject digest:
429b7db1b5eb44c3efb66201c7eecc9e1cca93aa0a92cd239339ecb25b040e44 - Sigstore transparency entry: 2363370742
- Sigstore integration time:
-
Permalink:
FuqingZh/neatxlsx@1cbf5cdcdb6d1e52f1430acbb8118f68679927f2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/FuqingZh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1cbf5cdcdb6d1e52f1430acbb8118f68679927f2 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file neatxlsx-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: neatxlsx-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 5.0 MB
- Tags: CPython 3.11+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2d6749baa996ba05fd016b17c73077ca7393c1e9c67fb0e7f0203b942b32017
|
|
| MD5 |
f385c619c42d8763a462d1509bd00a21
|
|
| BLAKE2b-256 |
2682d76712b1d80f7869e0a96547cb567c5ff025d3e13498658d87ea2a2b3d03
|
Provenance
The following attestation bundles were made for neatxlsx-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl:
Publisher:
publish.yml on FuqingZh/neatxlsx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
neatxlsx-0.1.0-cp311-abi3-macosx_10_12_x86_64.whl -
Subject digest:
c2d6749baa996ba05fd016b17c73077ca7393c1e9c67fb0e7f0203b942b32017 - Sigstore transparency entry: 2363370325
- Sigstore integration time:
-
Permalink:
FuqingZh/neatxlsx@1cbf5cdcdb6d1e52f1430acbb8118f68679927f2 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/FuqingZh
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1cbf5cdcdb6d1e52f1430acbb8118f68679927f2 -
Trigger Event:
workflow_dispatch
-
Statement type: