Parse or stream
Choose a format-specific parser and the consumption model your workload needs.
lokit.parse · lokit.streamThe fastest and most memory efficient localization SDK. Build for developers to parse all major file formats with full backend features included. A fresh XML-free loss-less interchange format with an LSP.
Format coverage
Each format guide covers the APIs that genuinely exist for that format—materialized, streaming, async, writing, and regeneration—without pretending every format has the same operational surface.
Application
Tabular
Documents
One predictable workflow
Choose a format-specific parser and the consumption model your workload needs.
lokit.parse · lokit.streamInspect, transform, match, split, or store the same Data units regardless of origin.
BaseStructure · DataCreate a canonical output or preserve the original package and vendor envelope.
document.export · document.regenShared structure
The public model keeps source text, selected and multilingual targets, status, plurals, inline content, context, comments, metadata, and extensions explicit.
Understand the data modelfrom lokit.types import BaseStructure, Data, TargetData
document = BaseStructure( source_locale="en-US", target_locale="fr-FR", data={ "checkout.submit": Data( source="Place order", target="Passer la commande", targets={ "fr-FR": TargetData( text="Passer la commande", ), }, extensions={"component": "checkout_button"}, ), },)Typed target shapes
Single-target and multilingual documents are documented as distinct shapes.
Stable downstream code
Matching and database APIs consume the same model the parsers produce.
Built for backend work
A py.typed package and one explicit model for units, targets, plurals, context, metadata, and inline content.
Choose random-access documents, one-shot streams, parallel TMX, or async iterators without changing the unit shape.
Create canonical output, or update translations inside an original envelope when vendor-specific content must survive.
Load the same model into PostgreSQL with COPY staging and run exact, contextual, tag-aware, or trigram matching.
Language tooling
Install lokit-lsp from GitHub today for diagnostics, completion, hover, symbols, folding, and canonical formatting. Published editor extensions are coming soon.
git clone https://github.com/ciarandarby/lokit.gitcd lokitcargo install --locked --path tools/lokit-lspNative installation flows for the three editors are in progress. The language server remains editor-independent and ready to use now.
Zed
Extension coming soon
VS Code
Extension coming soon
Cursor
Extension coming soon
Performance
The current display separates workload, median time, throughput, and peak cold RSS. Values are intentionally unchanged while the benchmark suite is being rerun.
Read benchmark notesTMX materialized catalog
50,000 units · 10.75 MB corpus
| Framework | Runtime | Median time | Units / second | Peak cold RSS |
|---|---|---|---|---|
Lokit | Rust / Python | 0.240s | 208,143 | 80.4 MiB |
Okapi Framework | Java | 0.263s | 189,437 | 269.2 MiB |
translate-toolkit | Python | 0.652s | 76,586 | 135.7 MiB |
Comparisons only become meaningful when semantic output, measurement scope, corpus, and runtime environment are stated together. See the benchmark page for the reporting checklist.
Package map
Start from the task you need to perform. Each module guide shows the canonical spelling first and calls out compatibility or advanced surfaces only where useful.
lokit.parseMaterialize supported inputs into BaseStructure.
lokit.streamConsume large files through bounded iterators.
document.exportWrite the common model to every supported output.
document.regenProduce localized files shaped like their sources.
lokit.LokitNavigate, filter, fuzzy-find, and score matches.
lokit.databaseBuild a PostgreSQL-backed translation memory.
lokit.typesImport the stable public model and enums.
Available in RC Beta
Lokit is pre-1.0 and moving quickly. Pin version 0.5.0, test the APIs your integration uses, and start with the format-specific guide for your source file.