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 |
|---|---|
DataExtraction | Extracts data from a document with the same operations, the same option names and the same output files as the hosted Nutrient data extraction service, so code and knowledge carry over between the two. Like every SDK operation, each one reads its options from the document’s settings: ParseSettings and ExtractSettings, generated from the hosted service’s parameters, and the canonical settings they alias. Options left unset keep the default the pipeline or the SDK-wide settings provide. |
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 a static create_index overload, passing either an open document or an input path and document settings, then call text_search 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. |
Class groups
| Group | 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 | requests classes |
results | results classes |
settings | Configuration objects controlling SDK behavior |
signing | Digital signatures, appearance, and timestamp configuration |
types | Primitive value types such as Color, RectF, and vec2f |
validation | validation classes |
Statistics
- Classes: 156
- Enumerations: 53
- Value types: 2