SuperDoc SDK (CLI-backed)
Project description
superdoc-sdk
Programmatic SDK for deterministic DOCX operations through SuperDoc's Document API.
Install
pip install superdoc-sdk
The package installs a platform-specific CLI companion package automatically via PEP 508 environment markers. Supported platforms:
| Platform | Architecture |
|---|---|
| macOS | Apple Silicon (arm64), Intel (x64) |
| Linux | x64, ARM64 |
| Windows | x64 |
Quick start
import asyncio
from superdoc import AsyncSuperDocClient
async def main():
client = AsyncSuperDocClient()
await client.doc.open({"doc": "./contract.docx"})
info = await client.doc.info({})
print(info["counts"])
results = await client.doc.find({"query": {"kind": "text", "pattern": "termination"}})
target = results["context"][0]["textRanges"][0]
await client.doc.replace({"target": target, "text": "expiration"})
await client.doc.save({"inPlace": True})
await client.doc.close({})
asyncio.run(main())
API
Client
from superdoc import SuperDocClient
client = SuperDocClient()
All document operations are on client.doc:
await client.doc.open(params)
await client.doc.find(params)
await client.doc.insert(params)
# ... etc
Operations
| Category | Operations |
|---|---|
| Query | find, get_node, get_node_by_id, info |
| Mutation | insert, replace, delete |
| Format | format.bold, format.italic, format.underline, format.strikethrough |
| Create | create.paragraph |
| Lists | lists.list, lists.get, lists.insert, lists.set_type, lists.indent, lists.outdent, lists.restart, lists.exit |
| Comments | comments.add, comments.edit, comments.reply, comments.move, comments.resolve, comments.remove, comments.set_internal, comments.set_active, comments.go_to, comments.get, comments.list |
| Track Changes | track_changes.list, track_changes.get, track_changes.accept, track_changes.reject, track_changes.accept_all, track_changes.reject_all |
| Lifecycle | open, save, close |
| Session | session.list, session.save, session.close, session.set_default |
| Introspection | status, describe, describe_command |
Troubleshooting
Custom CLI binary
If you need to use a custom-built CLI binary (e.g. a newer version or a patched build), set the SUPERDOC_CLI_BIN environment variable:
export SUPERDOC_CLI_BIN=/path/to/superdoc
Air-gapped / private index environments
Mirror both superdoc-sdk and the superdoc-sdk-cli-* package for your platform to your private index. For example, on macOS ARM64:
pip download superdoc-sdk superdoc-sdk-cli-darwin-arm64
# Upload both wheels to your private index
Part of SuperDoc
This SDK is part of SuperDoc — an open source document editor bringing Microsoft Word to the web.
License
AGPL-3.0 · Enterprise license available
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file superdoc_sdk-1.0.0a16.tar.gz.
File metadata
- Download URL: superdoc_sdk-1.0.0a16.tar.gz
- Upload date:
- Size: 80.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
303fc84e9d94c37cdb913cf56b3773c52540051344ba3c19ef8251b4199f9879
|
|
| MD5 |
4153defc87f99abaf69d777267f46472
|
|
| BLAKE2b-256 |
a3fcf4898f91f8920510901625b27336eb4b03d3e8c22592fdba7a96f3d0f2ee
|
Provenance
The following attestation bundles were made for superdoc_sdk-1.0.0a16.tar.gz:
Publisher:
release-sdk.yml on superdoc-dev/superdoc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
superdoc_sdk-1.0.0a16.tar.gz -
Subject digest:
303fc84e9d94c37cdb913cf56b3773c52540051344ba3c19ef8251b4199f9879 - Sigstore transparency entry: 975529980
- Sigstore integration time:
-
Permalink:
superdoc-dev/superdoc@6d8b81f5df361de0c1cfdad702e67583c6f31e78 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/superdoc-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-sdk.yml@6d8b81f5df361de0c1cfdad702e67583c6f31e78 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file superdoc_sdk-1.0.0a16-py3-none-any.whl.
File metadata
- Download URL: superdoc_sdk-1.0.0a16-py3-none-any.whl
- Upload date:
- Size: 88.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f46055b4486d805fde5b549ec1b8c9498a40d666541adf07accb0335a3876afa
|
|
| MD5 |
ce0b8022ada6597390f8b239a5065f6c
|
|
| BLAKE2b-256 |
aaa83490e2635db26b8e511c867781846f43f134875287f402eb351770b8a6ea
|
Provenance
The following attestation bundles were made for superdoc_sdk-1.0.0a16-py3-none-any.whl:
Publisher:
release-sdk.yml on superdoc-dev/superdoc
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
superdoc_sdk-1.0.0a16-py3-none-any.whl -
Subject digest:
f46055b4486d805fde5b549ec1b8c9498a40d666541adf07accb0335a3876afa - Sigstore transparency entry: 975529983
- Sigstore integration time:
-
Permalink:
superdoc-dev/superdoc@6d8b81f5df361de0c1cfdad702e67583c6f31e78 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/superdoc-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-sdk.yml@6d8b81f5df361de0c1cfdad702e67583c6f31e78 -
Trigger Event:
workflow_dispatch
-
Statement type: