rocx
Create Word .docx files in Rust, Python, or JavaScript. Describe the document in
code; rocx writes the DOCX package. It does not render pages, paginate
documents, or calculate fields such as page numbers.
Install and write your first DOCX · Feature guides · Compatibility
API: Rust · Python · JavaScript (Node/browser tarball, not on npm).
Example
Rust:
use rocx::{Document, Error, Paragraph, RunFormat, Section, TextRun};
async fn write_report() -> Result<(), Error> {
let title = TextRun::new("Hello, world!")
.with_format(RunFormat::default().with_bold(true));
let document = Document::new(vec![
Section::new(vec![Paragraph::from_children(vec![title.into()]).into()]).into(),
]);
document.resolve().await?.save("report.docx")
}
Python:
import asyncio
from rocx.declarative import Document, Paragraph, Section, TextRun
async def main():
document = Document([Section(children=[Paragraph(children=[
TextRun(text="Hello, world!", bold=True),
])])])
await document.save("report.docx")
asyncio.run(main())
JavaScript (Node ESM):
import { writeFile } from "node:fs/promises";
import { declarative as d, generateDocx } from "rocx-docx";
const document = d.Document([d.Section([
d.Paragraph([d.TextRun("Hello, world!", { format: { bold: true } })]),
])]);
await writeFile("report.docx", await generateDocx(document));
Project information
Metadata
Release files for rocx 0.5.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 |
|---|---|---|---|---|
| rocx-0.5.0.tar.gz | 1.2 MB | With provenance | Details for rocx-0.5.0.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| rocx-0.5.0-cp312-abi3-win_amd64.whl | CPython 3.12 | abi3 | Windows x86-64 | Details for rocx-0.5.0-cp312-abi3-win_amd64.whl |
| rocx-0.5.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.12 | abi3 | Linux glibc 2.17+ x86-64 | Details for rocx-0.5.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| rocx-0.5.0-cp312-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl | CPython 3.12 | abi3 | macOS 11.0+ ARM64, macOS 10.12+ x86-64, macOS 10.12+ universal2 (ARM64, x86-64) | Details for rocx-0.5.0-cp312-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl |
Total release size: 10.5 MB
Release files / rocx-0.5.0.tar.gz
| Download URL | rocx-0.5.0.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c82983a7572f8aef06009b2617414807aa54ede91211caf46770bcce8f37fdca
|
|
BLAKE2b-256 checksum How to use checksums |
dcc7b521af43eb755c42889f2a4646d974a60e4aa75106ca94eca38e47e48b49
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 27, 2026.
Transparency logRelease files / rocx-0.5.0-cp312-abi3-win_amd64.whl
| Download URL | rocx-0.5.0-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 2.3 MB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
9a4f5e0eb8537194b997d501acbe19d6f798fb136d9d1ab8932f9ed43ca17ed1
|
|
BLAKE2b-256 checksum How to use checksums |
31244829739f0c60468671446d595eba7ccfed55956a0dcfd01b74ac3b18022d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 27, 2026.
Transparency logRelease files / rocx-0.5.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | rocx-0.5.0-cp312-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 2.5 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
4fda3c2fc25e487f8bb11735a5e77d257b5017e115007a4d173bcbd332bb1894
|
|
BLAKE2b-256 checksum How to use checksums |
c443baf0b52cd6ea9fb6eac2ca91f1541bc66649b2ef59f6ae6ed380196be193
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 27, 2026.
Transparency logRelease files / rocx-0.5.0-cp312-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl
| Download URL | rocx-0.5.0-cp312-abi3-macosx_10_12_universal2.macosx_10_12_x86_64.macosx_11_0_arm64.whl |
|---|---|
| Size | 4.6 MB |
| Tags | CPython 3.12 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8ecf6a9f98807c55dd6204d2e38cda40fcd37498a0bdf71cd79cb4345372600a
|
|
BLAKE2b-256 checksum How to use checksums |
dc842ada174b2e8b3cc764d2788acf73b4c5e4925d3e4acb1fd257b2b600db73
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 27, 2026.
Transparency logSecurity for rocx 0.5.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 4 files in this release have been uploaded with provenance metadata.
Attestation for rocx-0.5.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 Nov 27, 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.