Skip to main content

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 bundles a native CLI binary for your platform. Supported platforms:

Platform Architecture
macOS Apple Silicon (arm64), Intel (x64)
Linux x64, ARM64
Windows x64

Quick start

from superdoc import SuperDocClient

client = SuperDocClient()

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"})

await client.doc.replace(
    target=results["context"][0]["textRanges"][0],
    text="expiration",
)

await client.doc.save(in_place=True)
await client.doc.close()

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

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

superdoc_sdk-1.0.0a8.tar.gz (79.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

superdoc_sdk-1.0.0a8-py3-none-any.whl (87.8 kB view details)

Uploaded Python 3

File details

Details for the file superdoc_sdk-1.0.0a8.tar.gz.

File metadata

  • Download URL: superdoc_sdk-1.0.0a8.tar.gz
  • Upload date:
  • Size: 79.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for superdoc_sdk-1.0.0a8.tar.gz
Algorithm Hash digest
SHA256 13e3bb3483eadf66154a7aba5e9ca55a9cc34d66992cb5a6f7b4c1b00e0b7c9f
MD5 5e9839dc539e84e0743a13e9b62534df
BLAKE2b-256 fdfa102a71d121697369aef46bdf50d02cbf53a3edcf2414b92dcba0a4a70c78

See more details on using hashes here.

Provenance

The following attestation bundles were made for superdoc_sdk-1.0.0a8.tar.gz:

Publisher: release-sdk.yml on superdoc-dev/superdoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file superdoc_sdk-1.0.0a8-py3-none-any.whl.

File metadata

  • Download URL: superdoc_sdk-1.0.0a8-py3-none-any.whl
  • Upload date:
  • Size: 87.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for superdoc_sdk-1.0.0a8-py3-none-any.whl
Algorithm Hash digest
SHA256 a7633f9284a1160728f9c32452bd92e8dbe0175da7ee91c080d1340f633e8a4e
MD5 237a52a8870321a9d39de3b91fb8dbce
BLAKE2b-256 a67afc1d8b7af1a5f19af7f681939deab7e1bc7cb724bc7a42178713586978e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for superdoc_sdk-1.0.0a8-py3-none-any.whl:

Publisher: release-sdk.yml on superdoc-dev/superdoc

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page