Skip to content

API reference

These pages are generated from the source with mkdocstrings.

Stability

Public stability is divided deliberately:

Module Status
caxton Recommended short facade. Start here.
caxton.api The extended generative API and the render/write/validate operations.
caxton.core.models Immutable semantic nodes.
caxton.core.types Semantic value types.
caxton.core.formatting Backend-neutral presentation vocabulary.
caxton.core.protocols Contracts for data sources, sinks and renderers.
caxton.core.ir Versioned read-only IR used by custom renderers.
caxton.core.errors The public exception and warning hierarchy.
caxton.testing Stable inspection and comparison surface.

Not public API

caxton._internal — including the bundled renderer implementations, mutable IR builders, parsers, planners and package post-processors — is an implementation detail. It may change in any release without notice.

Choosing an import

from caxton import spreadsheet, table, text, write  # everyday work
from caxton.api import xlsx  # XLSX escape hatches
from caxton.core.models import SpreadsheetDocument  # type annotations
from caxton.core.protocols import DataSource, Renderer  # custom integrations
from caxton.testing import inspect_artifact, inspect_spec  # tests