Skip to main content

sumoffice for Python

Open, edit, recalculate and save Excel workbooks, read Word documents and add slides to PowerPoint decks from Python. The package ships the native SumSheet, SumDoc and SumSlide cores inside the wheel: nothing is compiled on install, and you need neither Microsoft Office nor LibreOffice. To let people view and edit the documents in a browser, use SumOffice Server.

sumoffice.core_version() returns the exact packaged core release.

pip install sumoffice

Wheels exist for macOS (Apple silicon and Intel), Linux x86-64 and aarch64 (glibc 2.28 or newer) and Windows x64, for Python 3.10 and newer.

First result in five lines

Sample files for the examples below: https://sumoffice.com/samples/ (report.xlsm, budget.xlsm, model.xlsx, contract.docx, deck.pptx), or use your own files.

import sumoffice

wb = sumoffice.open("report.xlsm")
wb["Cash flow"]["B7"] = 42
wb.save("report-edited.xlsm")

The VBA project, Power Query parts and images stay in the saved file byte for byte; sumoffice never rewrites parts it did not change.

Three examples

1. Change a cell in a macro workbook and keep the macros

import sumoffice

wb = sumoffice.open("budget.xlsm")
print(wb.sheet_names)                 # ('Cash flow', 'Summary')
wb["Cash flow"]["B7"] = 42            # number, text, None, or a formula "=B5*2"
wb.save("budget-edited.xlsm")         # vbaProject.bin is kept as it was

2. Recalculate and read the results back

import sumoffice

wb = sumoffice.open("model.xlsx")
sheet = wb["Summary"]
sheet["A1"] = 1200
sheet["A2"] = "=A1*1.2"
wb.recalc()
print(sheet["A2"])                    # 1440
print(sheet.formula("A2"))            # '=A1*1.2'
print(sheet.read("A1:B3"))            # [[1200, None], [1440, None], [None, None]]
wb.save("model-edited.xlsx")

again = sumoffice.open("model-edited.xlsx")
assert again["Summary"]["A2"] == 1440

3. Read the text of a Word document; add a slide to a deck

import sumoffice

print(sumoffice.text("contract.docx"))

deck = sumoffice.open("deck.pptx")
deck.add_slide()
print(deck.slide_count)
deck.save("deck-edited.pptx")

Show it on your own server

The library contains no viewer. Without SUMOFFICE_SERVER_URL, sumoffice.view(path) returns the real server acquisition command. With that address and SUMOFFICE_SERVER_TOKEN set, it uploads the local file to POST /sdk/v1/documents and returns the server's signed editor_url.

editor = sumoffice.view("report-edited.xlsx")
print(editor.editor_url)

Use it from Claude Desktop, Cursor or another MCP client

The package includes a local MCP server that works only with files on your computer. Nothing is sent anywhere.

{
  "mcpServers": {
    "sumoffice": { "command": "/full/path/to/venv/bin/sumoffice-mcp" }
  }
}

Desktop apps do not read your shell's PATH, so give the full path: run which sumoffice-mcp (Windows: where sumoffice-mcp) in the environment where you installed the package. In Claude Desktop the file is claude_desktop_config.json (Settings → Developer → Edit Config); restart the app after saving.

Tools: open_workbook, read_range, write_cells, recalc, save_copy, document_text. By default the server reads files under your home directory; set SUMOFFICE_MCP_ROOTS (paths separated by the OS path separator) to allow other folders. save_copy never overwrites the source file.

What is free

Without a key With a developer key
Documents per day 30 10,000
Term no expiry 90 days from issue
When the quota is used up LicenseQuotaError right away, with a link to the key page; no waiting, no slowdown the same

A document counts once per opening, however many cells you change. Request a developer key at https://sumoffice.com/python#developer-key. Put the key in SUMOFFICE_LICENSE, or the path to the key file in SUMOFFICE_LICENSE_FILE.

The daily quota is enforced by the Word core today. The spreadsheet and presentation cores do not count documents yet, so their use is currently not limited.

What it does not do

  • It does not run VBA macros; it keeps them.
  • XLSX to PDF conversion and page previews are not in this wheel yet: sumoffice.convert() and sumoffice.preview() raise CapabilityUnavailableError and create no file.
  • Word support is read-only in the high-level API (sumoffice.text); editing goes through the low-level Session.
  • The Word core uses system fonts. On a server without fonts set FASTDOC_FONT_DIR to a folder with the document's fonts for stable layout.
  • A wheel works only on the operating system and CPU named in its file name.
  • Error messages are in Russian in this release.

Low level

sumoffice.Session opens a document in one core and accepts the core's own JSON commands. Engines are called "sheet", "doc" and "slide" (the names "sumsheet", "sumdoc" and "sumslide" also work). Call session.handshake() to see the operations a core supports.

Documentation and support

Metadata

Release files for sumoffice 2026.4.5

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

Built distributions (wheels)

Table of built distributions (wheels) for sumoffice 2026.4.5
File Actions
sumoffice-2026.4.5-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for sumoffice-2026.4.5-py3-none-win_amd64.whl
sumoffice-2026.4.5-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for sumoffice-2026.4.5-py3-none-manylinux_2_28_x86_64.whl
sumoffice-2026.4.5-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for sumoffice-2026.4.5-py3-none-manylinux_2_28_aarch64.whl
sumoffice-2026.4.5-py3-none-macosx_11_0_x86_64.whl Python 3 none macOS 11.0+ x86-64 Details for sumoffice-2026.4.5-py3-none-macosx_11_0_x86_64.whl
sumoffice-2026.4.5-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for sumoffice-2026.4.5-py3-none-macosx_11_0_arm64.whl

Total release size: 236.0 MB

Release files / sumoffice-2026.4.5-py3-none-win_amd64.whl

Download URL sumoffice-2026.4.5-py3-none-win_amd64.whl
Size 47.9 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
a9c7f81dbe4afd357ed2f9bae82b354e44d20d1d612b3607c2047d99ca189866
BLAKE2b-256 checksum
How to use checksums
bafdfffc97b2328b418ff0b1eab11f682559057dcd27dd672690e86bf6ef0b65
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.6

Release files / sumoffice-2026.4.5-py3-none-manylinux_2_28_x86_64.whl

Download URL sumoffice-2026.4.5-py3-none-manylinux_2_28_x86_64.whl
Size 48.0 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
87019787c8b70f7e590c2a43cc92c7b61a54283df38676c1ad14579bf6f09681
BLAKE2b-256 checksum
How to use checksums
a907987a959fd1ee75f4773a08f7a0c18123617f90b4107e7e7fd8645209fa81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.6

Release files / sumoffice-2026.4.5-py3-none-manylinux_2_28_aarch64.whl

Download URL sumoffice-2026.4.5-py3-none-manylinux_2_28_aarch64.whl
Size 44.2 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
5a3c996064e26371328b9b7d53e196fcf84f5cd49bb91b108577650cc88f8a18
BLAKE2b-256 checksum
How to use checksums
4d49f2f6faaa65184e081edf6c0e6d87dfd8fd5f11a7c89b6545ac1ab639dc2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.6

Release files / sumoffice-2026.4.5-py3-none-macosx_11_0_x86_64.whl

Download URL sumoffice-2026.4.5-py3-none-macosx_11_0_x86_64.whl
Size 49.2 MB
Tags Python 3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
aed2ef64e650829aedf0066b0bd4d0acd5845e818d66369f99b76d616ed3c069
BLAKE2b-256 checksum
How to use checksums
2b481f89f566b0c9dbfe12748fb3513f12e2bbcab4782204c2fdb46143a860c4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.6

Release files / sumoffice-2026.4.5-py3-none-macosx_11_0_arm64.whl

Download URL sumoffice-2026.4.5-py3-none-macosx_11_0_arm64.whl
Size 46.6 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
bfd906031a4f20ff6fcf0a0fd4df8baf2325c76343f755953c264e3764664dfa
BLAKE2b-256 checksum
How to use checksums
4f934067bf63ccf26dbd7d258771a07d7cf4781dff0623c6ddc9866ae0fa5618
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.6

Security for sumoffice 2026.4.5

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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