Skip to main content

stemma-py

Edit existing Word documents from Python with native tracked changes, the way Word itself represents them. A reviewer opens the result in Word and accepts or rejects each change.

Experimental. The Python API may change before 1.0. The engine underneath is the same one the Stemma CLI and MCP server run.

pip install stemma-py

The PyPI name is stemma-py; the import name is stemma. Wheels are self-contained: no compiler and no Python dependencies.

import stemma

doc = stemma.Document.open("contract.docx")
block = doc.read()["blocks"][1]

edited = doc.apply_authored({
    "ops": [{
        "op": "replace",
        "target": block["id"],
        "guard": block["guard"],
        "content": {"type": "paragraph",
                    "content": [{"type": "text", "text": "Liability is capped at twice the fees paid."}]},
    }],
    "revision": {"author": "J. Osei"},
})

assert edited.review()["validator"]["ok"]
edited.save("contract-redline.docx")

Everything else (comparing two versions, resolving revisions, auditing a delivery, the error classes) is in the Python reference.

Licensed under either of MIT or Apache-2.0, at your option.

Metadata

Release files for stemma-py 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stemma-py 0.9.0
File Size Uploaded Provenance Actions
stemma_py-0.9.0.tar.gz 2.2 MB With provenance Details for stemma_py-0.9.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for stemma-py 0.9.0
File Actions
stemma_py-0.9.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for stemma_py-0.9.0-cp39-abi3-win_amd64.whl
stemma_py-0.9.0-cp39-abi3-musllinux_1_2_x86_64.whl CPython 3.9 abi3 Linux musl 1.2+ x86-64 Details for stemma_py-0.9.0-cp39-abi3-musllinux_1_2_x86_64.whl
stemma_py-0.9.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for stemma_py-0.9.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
stemma_py-0.9.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for stemma_py-0.9.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
stemma_py-0.9.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for stemma_py-0.9.0-cp39-abi3-macosx_11_0_arm64.whl
stemma_py-0.9.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for stemma_py-0.9.0-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 38.2 MB

Release files / stemma_py-0.9.0.tar.gz

Download URL stemma_py-0.9.0.tar.gz
Size 2.2 MB
Tags Source
SHA-256 checksum
How to use checksums
757dc93248c002c91138607bb30b31ed5aae6e8034a79003c872a20a0330690d
BLAKE2b-256 checksum
How to use checksums
4298f4db63c15263162a0a11dfc0666004cc29da0284e4edab3eb0280f5453f4
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 19, 2026.

Transparency log

Release files / stemma_py-0.9.0-cp39-abi3-win_amd64.whl

Download URL stemma_py-0.9.0-cp39-abi3-win_amd64.whl
Size 5.7 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
75ceaf1e51ccc13835e0b4addb88b337edfd4ab00f1ad7d7097964aa4c6f2fab
BLAKE2b-256 checksum
How to use checksums
ff49dbb70cd98781cbcd3b591b589bf82dfbda17292410b69ace5d04db33c2ef
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 19, 2026.

Transparency log

Release files / stemma_py-0.9.0-cp39-abi3-musllinux_1_2_x86_64.whl

Download URL stemma_py-0.9.0-cp39-abi3-musllinux_1_2_x86_64.whl
Size 6.5 MB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
b3e77d1f193652df39c0fb6bcd532c90171df0aec654f58c019d68042aad0025
BLAKE2b-256 checksum
How to use checksums
d70afaaf3057bc77794c516eef1de2f071b38c5e45571d953730fd0b02a7c4c9
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 19, 2026.

Transparency log

Release files / stemma_py-0.9.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL stemma_py-0.9.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 6.2 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
4ccd356bbea7523ead8b98c1843a576b28c378d02d9f91617dd6ac807e85067c
BLAKE2b-256 checksum
How to use checksums
27f4685bebb53fd2cc9b5e350f4318a744a4aba22faf6842d70a83f5f8b265bb
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 19, 2026.

Transparency log

Release files / stemma_py-0.9.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL stemma_py-0.9.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 6.2 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
487deef52a79e17213e6dc713f68334e6dae8c5b934cba149ed1eebe3ca3fb72
BLAKE2b-256 checksum
How to use checksums
916c130a05b434964b2721a1c3cfc6e04787470dfe31055ad72b49401ec6c67d
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 19, 2026.

Transparency log

Release files / stemma_py-0.9.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL stemma_py-0.9.0-cp39-abi3-macosx_11_0_arm64.whl
Size 5.6 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a9f697364c0afeffd9da764fcdc57166be668c601ce1f00f92fa0184f9f62b16
BLAKE2b-256 checksum
How to use checksums
00b0f804a4e97106fa2e6330d162fbdf4373f1cd8cff79e19295e2a22513ba6f
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 19, 2026.

Transparency log

Release files / stemma_py-0.9.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL stemma_py-0.9.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 5.8 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
c762fb3790b2132d5a198ebe6fc586d62623b015aa9cf9d4e287661bab46b8fc
BLAKE2b-256 checksum
How to use checksums
dab0b7a78b5f011ea715f30f2c2c9e43fd55bd635927ad48d1355402ccb02b5c
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 19, 2026.

Transparency log

Security for stemma-py 0.9.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.

Select from 7 files

Attestation for stemma_py-0.9.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 19, 2026.

Transparency log

A 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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page