Browse documentation
Native .lokit format
A sparse, versioned interchange format designed to round-trip Lokit's full documented model.
Format at a glance
.lokit is line-oriented, omits missing optional values instead of emitting null, and distinguishes absent values from present empty values. Version 1 uses signed 64-bit integers, limits canonical physical lines to 1 MiB, and fails explicitly when a value is outside its representable domain.
@lokit 1document { source_locale = "en-US" target_locale = "fr-FR"}unit "home.title" { source = "Welcome" target = "Bienvenue" status = translated}Python API
Use the materialized parser for editing or repeated access, the synchronous stream for one pass, and the async iterator inside an event loop.
import lokit
document = lokit.parse.lokit("messages.lokit")streamed = lokit.stream.lokit("messages.lokit")lokit.write.lokit(document, "copy.lokit")
async def inspect() -> None: async for unit_id, unit in lokit.parse.async_.lokit("messages.lokit"): print(unit_id, unit.source)Editor tooling
The standalone lokit-lsp uses the same Rust parser, validator, source spans, and canonical writer as the Python binding. It provides diagnostics, completion, hover, symbols, folding, and formatting. It is built from the repository and is not included in the Python source distribution.