Types
The Python SDK exposes the types below. Import any of them from the top-level poli_page module:
from poli_page import ( RenderInput, DocumentDescriptor, AsyncDocumentDescriptor, DocumentPreviewResult, Thumbnail, ThumbnailOptions, RetryEvent,)RenderInput
Section titled “RenderInput”Render a stored project + template by slug.
RenderMetadata
Section titled “RenderMetadata”Public type exported from poli_page.
DocumentPreviewResult
Section titled “DocumentPreviewResult”Result of client.documents.preview(id) (spec §6.2).
DocumentDescriptor
Section titled “DocumentDescriptor”Stored document returned by sync render.document / documents.get.
AsyncDocumentDescriptor
Section titled “AsyncDocumentDescriptor”Stored document returned by async render.document / documents.get.
Thumbnail
Section titled “Thumbnail”A single page thumbnail returned by documents.thumbnails (spec §6.3).
ThumbnailOptions
Section titled “ThumbnailOptions”Options for client.documents.thumbnails(id, options) (spec §6.3).
PageFormat
Section titled “PageFormat”Public type exported from poli_page.
Orientation
Section titled “Orientation”Public type exported from poli_page.
Environment
Section titled “Environment”Public type exported from poli_page.
RetryEvent
Section titled “RetryEvent”Event passed to the on_retry hook before each retry sleep.
OnRetry
Section titled “OnRetry”Public type exported from poli_page.
OnError
Section titled “OnError”Public type exported from poli_page.
For the full field lists on each dataclass and TypedDict, see the source on GitHub.