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.7.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.7.0
File Size Uploaded Provenance Actions
stemma_py-0.7.0.tar.gz 1.9 MB With provenance Details for stemma_py-0.7.0.tar.gz

Built distributions (wheels)

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

Total release size: 33.2 MB

Release files / stemma_py-0.7.0.tar.gz

Download URL stemma_py-0.7.0.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
296ae4ce0c4ed24cc1b7c7be4c5f23813991d2b8a467eac26933f834bf35a8ce
BLAKE2b-256 checksum
How to use checksums
923db2c4467865d82b08c6d19bec5fcae0896f5a0a5b44d8e1208d5809a65f3e
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 7, 2026.

Transparency log

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

Download URL stemma_py-0.7.0-cp39-abi3-win_amd64.whl
Size 5.0 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
291f4efce45036476cf4f971dcba9ed1a0fbd7eee0173840895a92048204e12f
BLAKE2b-256 checksum
How to use checksums
33d534eb8d97e8a489966732912ea955531c2181062c5c8f9d8a1e40a0eb794f
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 7, 2026.

Transparency log

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

Download URL stemma_py-0.7.0-cp39-abi3-musllinux_1_2_x86_64.whl
Size 5.7 MB
Tags CPython 3.9 Linux musl 1.2+ x86-64 abi3
SHA-256 checksum
How to use checksums
301d6ce354406d0f7c3c28d3e09935bd5dc14f0e962562227f12074f81d2abfb
BLAKE2b-256 checksum
How to use checksums
9b148ab8edce9adbada171923dabefaae575796334fa967e702609d33ff1c3f6
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 7, 2026.

Transparency log

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

Download URL stemma_py-0.7.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 5.4 MB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
721987597fbec8f914b29d69b63d795ab3dfe5dd5590b4b5028bcd529d0ce051
BLAKE2b-256 checksum
How to use checksums
d2f95fbba8c744c8a22d7d85a40e1e745bd1b488d63f3ebb63f0341ac127cb52
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 7, 2026.

Transparency log

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

Download URL stemma_py-0.7.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 5.3 MB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
e2fbe93b6507a7ebbb16b186462a4bb88c1bdc42f5a691091e1592cbb935f587
BLAKE2b-256 checksum
How to use checksums
7cc4342f3395d6e072434b5caff16ce920c46f411c77ce2253bd21d33c273257
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 7, 2026.

Transparency log

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

Download URL stemma_py-0.7.0-cp39-abi3-macosx_11_0_arm64.whl
Size 4.9 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a020f9221ad5cc7b743a7eb7e5f35e5b0a4ea6c34a697bccb225ab493f6f7a14
BLAKE2b-256 checksum
How to use checksums
1ecfd7c6f12c37faeaef5f3bd4ff970978e4b0d0b51002c73ec3f7ab472c8853
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 7, 2026.

Transparency log

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

Download URL stemma_py-0.7.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 5.0 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
f7bc76b8057ab0159572f23a968ada9b7ebe87c62522595f8b07754e25bd2188
BLAKE2b-256 checksum
How to use checksums
97e567c4e2e67737dd726d18a5460fac2d10d390387ed3cc1cb5c20bd398272a
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 7, 2026.

Transparency log

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