Python API reference
Complete API reference for Nutrient Python SDK.
Installation
pip install nutrient-sdkQuick start
from nutrient_sdk import Document
# Open a PDF and convert it to a Word documentwith Document.open("input.pdf") as document: document.export_as_word("output.docx") print("Successfully converted to output.docx")Classes
| Class | Description |
|---|---|
Document | Represents a document that can be opened, edited, and exported in various formats. Provides a unified interface for working with different document types including PDF, Word, Excel, and more. |
License | Manages licensing for the Nutrient Native SDK. Provides methods to register license keys and trace licensed features in evaluation mode (without registering a key). |
Query | Entry point for querying document content. A Query holds a built, in-memory search index over a document (or a file / folder / prebuilt index) and answers ranked text-search questions against it — the “index once, query many” model. Build one with the static CreateIndex / CreateIndex factories, then call TextSearch on the returned instance as often as you like. The ranking itself lives in the engine-independent NativeSDK.Search assembly; this licensed, bridge-exposed facade applies the entitlement gate and delegates. |
Telemetry | Telemetry control surface used by the fiona CLI’s send-only child mode. Lets a parent process dump proto payloads to disk via the NUTRIENT_PAYLOAD_PATH environment variable, exit fast, and have a short-lived child re-hydrate and ship them in parallel. |
Vision | Provides machine learning and computer vision capabilities for document processing. Enables AI-powered document description and content extraction. |
Modules
| Module | Description |
|---|---|
editors | Document editor classes for PDF and Word manipulation |
editors.pdf.annotations | PDF annotation types (highlight, text, shape, stamp, and more) |
editors.pdf.formfields | PDF form field types (text, check box, radio, list, signature) |
editors.pdf.pages | PDF page access, metadata, and page collections |
enums | Enumeration types used across the SDK |
exceptions | SDK-specific exception classes raised by operations that can fail |
exporters | Exporters for PDF, image, Markdown, HTML, SVG, Word, spreadsheet, and presentation formats |
interfaces | Interface definitions implemented by SDK types |
requests | Classes in the requests module |
settings | Configuration objects controlling SDK behavior |
signing | Digital signatures, appearance, and timestamp configuration |
types | Primitive value types such as Color, RectF, and vec2f |
Statistics
- Classes: 125
- Enumerations: 40
- Value types: 2