Browse documentation
DocsAPI module

lokit.types

Stable core structures, enums, matching results, projection fields, and inline-content types.

01

Core exports

The package ships py.typed. Stable document exports include BaseStructure, StreamingStructure, Data, TargetData, Plural, Meta, Comment, Origin, AdjacentContext, TranslationStatus, and PluralCategory. Keep the BaseStructure map open for their complete fields and nesting.

types.py
from lokit.types import (    BaseStructure,    Data,    TargetData,    TranslationStatus,)
02

Inline content and projections

Tags, TargetTags, TextPart, CodePart, TieData, TieType, Segment, InlineCode, NativeCode, TagAttribute, their enums, diagnostics, and TagIntegrityError describe common inline content and conversion. DictField, StringMode, and TranslationRow control flat projections. The tag integrity guide documents every field and policy; metadata and plurals covers all non-text unit types.

03

Type-safe construction

The root model uses slotted dataclasses and explicit optional fields. Prefer constructing the public types rather than dictionaries when creating documents in application code; this keeps static checking useful and avoids ambiguous target shapes.