Browse documentation
lokit.types
Stable core structures, enums, matching results, projection fields, and inline-content types.
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.
from lokit.types import ( BaseStructure, Data, TargetData, TranslationStatus,)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.
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.