rdocx-py
Native rdocx for Python
rdocx gives Python applications a native DOCX workflow for creating,
opening, editing, comparing, laying out, and rendering Word documents. It
works directly with OOXML packages and does not require Microsoft Word,
LibreOffice, a conversion service, or a Java or .NET runtime.
The package uses the Rust rdocx document engine. Unsupported safe producer
XML remains available to the package rather than being discarded during an
ordinary open and save cycle.
Installation
Install the current release from PyPI:
python -m pip install rdocx
rdocx requires CPython 3.9 or newer. Its platform wheels use the Python 3.9
stable ABI, so one wheel supports multiple compatible Python versions. Source
installation requires a Rust toolchain and maturin.
Quick start
from rdocx import Document
doc = Document()
doc.add_paragraph("Hello from Python")
doc.save("hello.docx")
pdf = doc.to_pdf()
with open("report.pdf", "wb") as output:
output.write(pdf)
Capabilities
- File and byte-based DOCX input and output.
- Paragraphs, runs, fonts, tables, rows, cells, sections, and styles.
- Rich headers, footers, related stories, and resolved hyperlinks.
- Tracked comparison, main-body comment threads, revision resolution, and TOC rebuilding.
- Deterministic layout fragments, page geometry, and PDF, PNG, JPEG, and TIFF output through the native document engine.
- Python collections with negative indexes, slices, iteration, and explicit stale-handle errors after structural changes.
Use it when
Use rdocx when a Python service, desktop application, or automation task
needs to work with Word documents locally. It is suited to template updates,
document assembly, review workflows, comparison, and deterministic output.
Relationship
The Python API is intentionally focused. It is source compatible with the
documented rdocx surface, but it is not a drop-in replacement for every
python-docx method or private lxml object.
Example
Open and update an existing document:
from rdocx import Document
document = Document("template.docx")
document.add_paragraph("Approved")
document.save("approved.docx")
Type checking
The distribution includes hand-written extension stubs and a py.typed
marker. Editors and type checkers can inspect concrete document, paragraph,
run, table, section, story, comment, comparison, and layout types.
python -m pip install mypy
python -m mypy your_application.py
The release gate validates the installed package with strict mypy and
stubtest in addition to its runtime suite.
Project links
License
Licensed under either the MIT License or the Apache License 2.0, at your option.
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 rdocx-0.13.2.tar.gz.
File metadata
- Download URL: rdocx-0.13.2.tar.gz
- Upload date:
- Size: 7.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
899d2fae1bb2acc8f5d94e2e2cd55604f9a171efdf47f44087f77439f7b1fe7f
|
|
| MD5 |
96405b290565285fc773802f4d086898
|
|
| BLAKE2b-256 |
1afcac855af803833db1a1eaf1d5f521bdeca5045e9442954e64e9dd9cd55d88
|
Provenance
The following attestation bundles were made for rdocx-0.13.2.tar.gz:
Publisher:
wheels.yml on tensorbee/rdocx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rdocx-0.13.2.tar.gz -
Subject digest:
899d2fae1bb2acc8f5d94e2e2cd55604f9a171efdf47f44087f77439f7b1fe7f - Sigstore transparency entry: 2840783001
- Sigstore integration time:
-
Permalink:
tensorbee/rdocx@2b009243ed39ab66470d7484d490985368e865a8 -
Branch / Tag:
refs/tags/py-rdocx-v0.13.2 - Owner: https://github.com/tensorbee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@2b009243ed39ab66470d7484d490985368e865a8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rdocx-0.13.2-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: rdocx-0.13.2-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 12.6 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d81ee97c1f30cac667dc03024b4163dc9308e7479dc9e9e6ca54e1660e8b695d
|
|
| MD5 |
3324d4ee9a1aeda6cd598c03f3d1b187
|
|
| BLAKE2b-256 |
787d7b9e9f2e68d1014a93746d8272351b25b1a38bf4a07e2342485072d68efc
|
Provenance
The following attestation bundles were made for rdocx-0.13.2-cp39-abi3-win_amd64.whl:
Publisher:
wheels.yml on tensorbee/rdocx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rdocx-0.13.2-cp39-abi3-win_amd64.whl -
Subject digest:
d81ee97c1f30cac667dc03024b4163dc9308e7479dc9e9e6ca54e1660e8b695d - Sigstore transparency entry: 2840783239
- Sigstore integration time:
-
Permalink:
tensorbee/rdocx@2b009243ed39ab66470d7484d490985368e865a8 -
Branch / Tag:
refs/tags/py-rdocx-v0.13.2 - Owner: https://github.com/tensorbee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@2b009243ed39ab66470d7484d490985368e865a8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rdocx-0.13.2-cp39-abi3-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: rdocx-0.13.2-cp39-abi3-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 12.7 MB
- Tags: CPython 3.9+, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0aff68233c87d3cf873145082745c85b1b685ba6715b0a7252ed57eeeba1479a
|
|
| MD5 |
7a9126283dad1585407ad13b29b0813d
|
|
| BLAKE2b-256 |
1df8cb8dcd57c40379c65a76fd6076561d1dc8692bdc6cb5be93dbf707af4396
|
Provenance
The following attestation bundles were made for rdocx-0.13.2-cp39-abi3-musllinux_1_2_x86_64.whl:
Publisher:
wheels.yml on tensorbee/rdocx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rdocx-0.13.2-cp39-abi3-musllinux_1_2_x86_64.whl -
Subject digest:
0aff68233c87d3cf873145082745c85b1b685ba6715b0a7252ed57eeeba1479a - Sigstore transparency entry: 2840783538
- Sigstore integration time:
-
Permalink:
tensorbee/rdocx@2b009243ed39ab66470d7484d490985368e865a8 -
Branch / Tag:
refs/tags/py-rdocx-v0.13.2 - Owner: https://github.com/tensorbee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@2b009243ed39ab66470d7484d490985368e865a8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rdocx-0.13.2-cp39-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: rdocx-0.13.2-cp39-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 12.5 MB
- Tags: CPython 3.9+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0900aad2f1d5404d23059aa67df7021faa2158ed08ed5940467bfd7cdccd258d
|
|
| MD5 |
ab95657180ba693a521e173c6c17d930
|
|
| BLAKE2b-256 |
b3b24e247fbe578457d7f48da5a6411075ced7d518a145f456cdf7e10a1ce528
|
Provenance
The following attestation bundles were made for rdocx-0.13.2-cp39-abi3-manylinux_2_28_x86_64.whl:
Publisher:
wheels.yml on tensorbee/rdocx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rdocx-0.13.2-cp39-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
0900aad2f1d5404d23059aa67df7021faa2158ed08ed5940467bfd7cdccd258d - Sigstore transparency entry: 2840783680
- Sigstore integration time:
-
Permalink:
tensorbee/rdocx@2b009243ed39ab66470d7484d490985368e865a8 -
Branch / Tag:
refs/tags/py-rdocx-v0.13.2 - Owner: https://github.com/tensorbee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@2b009243ed39ab66470d7484d490985368e865a8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rdocx-0.13.2-cp39-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: rdocx-0.13.2-cp39-abi3-manylinux_2_28_aarch64.whl
- Upload date:
- Size: 12.1 MB
- Tags: CPython 3.9+, manylinux: glibc 2.28+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3be78d4a33efa89a73ce1f8e59322ae15f700f056cd5b1887f3c04a2d38e9d52
|
|
| MD5 |
b86ad68db5c8fd3bf8a529579f96a445
|
|
| BLAKE2b-256 |
f946b86bcc9d8d6166ede3c632f54d5d98983b511093fecf3014b5a9b8ab1bd5
|
Provenance
The following attestation bundles were made for rdocx-0.13.2-cp39-abi3-manylinux_2_28_aarch64.whl:
Publisher:
wheels.yml on tensorbee/rdocx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rdocx-0.13.2-cp39-abi3-manylinux_2_28_aarch64.whl -
Subject digest:
3be78d4a33efa89a73ce1f8e59322ae15f700f056cd5b1887f3c04a2d38e9d52 - Sigstore transparency entry: 2840783097
- Sigstore integration time:
-
Permalink:
tensorbee/rdocx@2b009243ed39ab66470d7484d490985368e865a8 -
Branch / Tag:
refs/tags/py-rdocx-v0.13.2 - Owner: https://github.com/tensorbee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@2b009243ed39ab66470d7484d490985368e865a8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rdocx-0.13.2-cp39-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: rdocx-0.13.2-cp39-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 12.0 MB
- Tags: CPython 3.9+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c4b6bdfc32ca4c1f555f03ac0c09e93bd4514786a4449604b76fc35059dafb4f
|
|
| MD5 |
10da6410891c9204506cff4406c32497
|
|
| BLAKE2b-256 |
2f6ce22781a02575f8cf46229d4d84ef3f0b3b0b82ea5d5951edc7b605ceef8c
|
Provenance
The following attestation bundles were made for rdocx-0.13.2-cp39-abi3-macosx_11_0_arm64.whl:
Publisher:
wheels.yml on tensorbee/rdocx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rdocx-0.13.2-cp39-abi3-macosx_11_0_arm64.whl -
Subject digest:
c4b6bdfc32ca4c1f555f03ac0c09e93bd4514786a4449604b76fc35059dafb4f - Sigstore transparency entry: 2840783841
- Sigstore integration time:
-
Permalink:
tensorbee/rdocx@2b009243ed39ab66470d7484d490985368e865a8 -
Branch / Tag:
refs/tags/py-rdocx-v0.13.2 - Owner: https://github.com/tensorbee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@2b009243ed39ab66470d7484d490985368e865a8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rdocx-0.13.2-cp39-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: rdocx-0.13.2-cp39-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 12.2 MB
- Tags: CPython 3.9+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dfcc6a9862075440fecfa80207274172c24b9126fdbc3f2fe6fe7d1a20911d18
|
|
| MD5 |
fc62215f76887c288bf24c20cb0b6d21
|
|
| BLAKE2b-256 |
e544c685d0db808c5613db5521d40acecaefa0f7c25f4ae8706feee6d06175e1
|
Provenance
The following attestation bundles were made for rdocx-0.13.2-cp39-abi3-macosx_10_12_x86_64.whl:
Publisher:
wheels.yml on tensorbee/rdocx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rdocx-0.13.2-cp39-abi3-macosx_10_12_x86_64.whl -
Subject digest:
dfcc6a9862075440fecfa80207274172c24b9126fdbc3f2fe6fe7d1a20911d18 - Sigstore transparency entry: 2840783424
- Sigstore integration time:
-
Permalink:
tensorbee/rdocx@2b009243ed39ab66470d7484d490985368e865a8 -
Branch / Tag:
refs/tags/py-rdocx-v0.13.2 - Owner: https://github.com/tensorbee
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
wheels.yml@2b009243ed39ab66470d7484d490985368e865a8 -
Trigger Event:
push
-
Statement type: