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.8.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.8.0
File Size Uploaded Provenance Actions
stemma_py-0.8.0.tar.gz 2.1 MB With provenance Details for stemma_py-0.8.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for stemma-py 0.8.0
File Actions
stemma_py-0.8.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for stemma_py-0.8.0-cp39-abi3-win_amd64.whl
stemma_py-0.8.0-cp39-abi3-musllinux_1_2_x86_64.whl CPython 3.9 abi3 Linux musl 1.2+ x86-64 Details for stemma_py-0.8.0-cp39-abi3-musllinux_1_2_x86_64.whl
stemma_py-0.8.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.8.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
stemma_py-0.8.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for stemma_py-0.8.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
stemma_py-0.8.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for stemma_py-0.8.0-cp39-abi3-macosx_11_0_arm64.whl
stemma_py-0.8.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for stemma_py-0.8.0-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 35.4 MB

Release files / stemma_py-0.8.0.tar.gz

Download URL stemma_py-0.8.0.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
a4f5f5c8bbc860a228e47d46ff538d8619d29ab99e07ce1d4d753b9cb6ce78a9
BLAKE2b-256 checksum
How to use checksums
3cf48ddf2eb58c15d66f1a3e50dba79fc1a8595418192f90ac17e964a9b7d2c0
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 14, 2026.

Transparency log

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

Download URL stemma_py-0.8.0-cp39-abi3-win_amd64.whl
Size 5.3 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
ec6108bb6c6d9168d06c9acf47ab802fdad9db5fedeb236aaddce8629e173c97
BLAKE2b-256 checksum
How to use checksums
16f0aa3b20ce2f6ad204e17563c73cda7c461d6d3ed204d1a0b228710927faeb
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 14, 2026.

Transparency log

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

Download URL stemma_py-0.8.0-cp39-abi3-musllinux_1_2_x86_64.whl
Size 6.0 MB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
5388fac7cc1d583576e7ac9e7a41823c56ca784c2b5413c7310df70f92f03032
BLAKE2b-256 checksum
How to use checksums
6b131633a417a0a17b26833f7fb2e6bd3a7c1217d24c90c4a91b71af0a4b8184
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 14, 2026.

Transparency log

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

Download URL stemma_py-0.8.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 5.8 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
9f7d4fb761f15f8e473af1f6f7446bf649cbf040e19d638a6a2bf3b9d9ddcb9d
BLAKE2b-256 checksum
How to use checksums
1a11d7c358e7f8310b850cfa56e169cf403b8d69c8146c669753f835851bed2a
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 14, 2026.

Transparency log

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

Download URL stemma_py-0.8.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 5.7 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
e6c692550d28459ae653832db61c7474e0f9df1249ac1a25066e5ca78368d044
BLAKE2b-256 checksum
How to use checksums
04fc53f27f5c8dc66e9b724dc78ac78a5bdd8f1c5f676df195440555575d7a65
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 14, 2026.

Transparency log

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

Download URL stemma_py-0.8.0-cp39-abi3-macosx_11_0_arm64.whl
Size 5.2 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1af045e72e39d05c90a6ee5d970109abcf1d8630dfdb7dade5eef093f4bdf0e6
BLAKE2b-256 checksum
How to use checksums
40e752182c77e20b661171890f78557f482ad3807ed7329cf7c81076c4ae08eb
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 14, 2026.

Transparency log

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

Download URL stemma_py-0.8.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 5.3 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
2e8ab8bcf4363f4d564c10f63bc2a363af92e625733644c66148f7adcc0eba1e
BLAKE2b-256 checksum
How to use checksums
6cc778bb0b9c630a747bd3a29ef0d161eea673d6a7b915275de1c5aa62d0c464
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 14, 2026.

Transparency log

Security for stemma-py 0.8.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.8.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 14, 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