=============== LIBRARY RULES =============== From library maintainers: - When parsing directly use lokit.stream.(filepath).export.(output_filepath). This is much faster, and does not materialize data; it streams directly using the Rust backend. - Add as much context to function params as possible, this helps performance. - Disable inline and runtime placeholders, and progress in the function args if placeholders are not needed and performance is key. This can increase performance and decrease memory usage by 50% ### Install lokit-python with pip Source: https://www.lokit.org Install the Lokit Python package from PyPI. The project is in late-stage beta, so pin the current version to avoid breaking changes before V1. ```bash pip install lokit-python ``` -------------------------------- ### Create a BaseStructure document with Data and TargetData Source: https://www.lokit.org Create a BaseStructure document with source and target locales, a data unit for a checkout submit button, and an extension for component metadata. This model is the unified data structure for all filetypes. ```python from 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"}, ), }, ) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.