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.
Metadata
Release files for rdocx 0.14.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rdocx-0.14.0.tar.gz | 7.3 MB | With provenance | Details for rdocx-0.14.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| rdocx-0.14.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details for rdocx-0.14.0-cp39-abi3-win_amd64.whl |
| rdocx-0.14.0-cp39-abi3-musllinux_1_2_x86_64.whl | CPython 3.9 | abi3 | Linux musl 1.2+ x86-64 | Details for rdocx-0.14.0-cp39-abi3-musllinux_1_2_x86_64.whl |
| rdocx-0.14.0-cp39-abi3-manylinux_2_28_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.28+ x86-64 | Details for rdocx-0.14.0-cp39-abi3-manylinux_2_28_x86_64.whl |
| rdocx-0.14.0-cp39-abi3-manylinux_2_28_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.28+ ARM64 | Details for rdocx-0.14.0-cp39-abi3-manylinux_2_28_aarch64.whl |
| rdocx-0.14.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details for rdocx-0.14.0-cp39-abi3-macosx_11_0_arm64.whl |
| rdocx-0.14.0-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details for rdocx-0.14.0-cp39-abi3-macosx_10_12_x86_64.whl |
Total release size: 83.7 MB
Release files / rdocx-0.14.0.tar.gz
| Download URL | rdocx-0.14.0.tar.gz |
|---|---|
| Size | 7.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ac14ef29fd8edc93259564788b90e667e27cb2861766d6b0961b79acc61affc
|
|
BLAKE2b-256 checksum How to use checksums |
740bb3233b5c65586a366cb1ae6e8139869156f2e0ec9583a9e7389e579c2b65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Sep 18, 2026.
Transparency logRelease files / rdocx-0.14.0-cp39-abi3-win_amd64.whl
| Download URL | rdocx-0.14.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 13.0 MB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
52493d637a14f1e8dee21924bf37dbe48f998d5fd8910d051f24ee3d0ebdbc4c
|
|
BLAKE2b-256 checksum How to use checksums |
ba1c2f21d72272dbf7d9b19579247c7963ac9e7fb8e30a8c3a724c5d16964278
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Sep 18, 2026.
Transparency logRelease files / rdocx-0.14.0-cp39-abi3-musllinux_1_2_x86_64.whl
| Download URL | rdocx-0.14.0-cp39-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 13.1 MB |
| Tags | CPython 3.9 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
d3006f30fce730fb4ea2b5a552f2f4526f89e83a00699694ec6e73a41d674c82
|
|
BLAKE2b-256 checksum How to use checksums |
c4b13f959a8c9b333343f8ca7b679669f33cae48ea208287ef760d068df4040b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Sep 18, 2026.
Transparency logRelease files / rdocx-0.14.0-cp39-abi3-manylinux_2_28_x86_64.whl
| Download URL | rdocx-0.14.0-cp39-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 12.9 MB |
| Tags | CPython 3.9 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e35f47a2227a0a3bc50e404c0399472d326934da8739077fd0f43f45de8f949e
|
|
BLAKE2b-256 checksum How to use checksums |
1672f11a728a86efe78adae0707e4d50eacee64c0a79ed648f67eacd89c35465
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Sep 18, 2026.
Transparency logRelease files / rdocx-0.14.0-cp39-abi3-manylinux_2_28_aarch64.whl
| Download URL | rdocx-0.14.0-cp39-abi3-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 12.4 MB |
| Tags | CPython 3.9 Linux glibc 2.28+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
c4a56efa3bba70110215853988ad28726b89c0b3f4c67fe066893b9366984aab
|
|
BLAKE2b-256 checksum How to use checksums |
9a422fac4e9361d648873c2c0da10b77c4cbc311c12399cf58443e3cb3608e18
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Sep 18, 2026.
Transparency logRelease files / rdocx-0.14.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | rdocx-0.14.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 12.3 MB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
dccdddbda2bbe303f3952d66969ddedfbaf59e1b04cc4e30fbba8c095ff09e43
|
|
BLAKE2b-256 checksum How to use checksums |
cd3d8c1d27812e63f455f85114a7bb05f0ee93f18a7eef0ff1fc5d2c44cca926
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Sep 18, 2026.
Transparency logRelease files / rdocx-0.14.0-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | rdocx-0.14.0-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 12.6 MB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
283cc6aed457ab755000478675f21472161bc76e8f79aa19b502ecc12c2cb125
|
|
BLAKE2b-256 checksum How to use checksums |
da9b0caa44834c866ebb81a2d01562e7cf998dfe50b7600aa4845c4116f7d0f3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 Sep 18, 2026.
Transparency logSecurity for rdocx 0.14.0
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.
Full provenance
All 7 files in this release have been uploaded with provenance metadata.
Attestation for rdocx-0.14.0.tar.gz
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 Sep 18, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.