Types
The Python SDK exposes the types below. Import any of them from the top-level poli_page module:
from poli_page import ( ProjectModeInput, InlineModeInput, RenderInput, PreviewResult, DocumentDescriptor, AsyncDocumentDescriptor, DocumentPreviewResult, Thumbnail, ThumbnailOptions, RetryEvent,)ProjectModeInput
Section titled “ProjectModeInput”Render against a stored project + template by slug.
InlineModeInput
Section titled “InlineModeInput”Render with raw HTML inline. No project resolution.
RenderInput
Section titled “RenderInput”Public type exported from poli_page.
RenderMetadata
Section titled “RenderMetadata”Public type exported from poli_page.
PreviewResult
Section titled “PreviewResult”Result of client.render.preview(input) (spec §5.3).
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.