fluent.syntax
Localization library for expressive translations.
What it is and what it does
fluent.syntax is a Python library for working with Fluent, a localization file format designed for expressive translations. It provides a parser to read Fluent files into an abstract syntax tree, a serializer to write trees back to Fluent syntax, and traversal utilities (Visitor and Transformer) for programmatic manipulation of localization messages. The package is built for developers who need to build tooling around Fluent rather than end-user localization; it exposes the full AST so you can inspect and modify message structure directly.
The library has a single runtime dependency (typing-extensions) and installs as a pure-Python wheel with low friction. It is actively maintained and has been in development since early 2019, with a stable API suitable for production use in localization pipelines, message transformation scripts, or Fluent-aware build tools.
Use it for:
- Parse and validate Fluent localization files in a build or CI pipeline.
- Programmatically transform or migrate Fluent messages between formats or structures.
- Build editor or IDE tooling that understands Fluent syntax and AST structure.
- Extract and analyze localization metadata from Fluent files for reporting or auditing.
- Serialize modified message trees back to Fluent format after programmatic edits.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Parse, write, and transform Fluent localization files with built-in support for syntax trees, serialization, and tree traversal utilities.
Yes, if you need to work with Fluent localization files programmatically. The package is actively maintained, has no known vulnerabilities, installs cleanly, and is permissively licensed. It is the standard tool for Fluent tooling in Python. Not necessary if you only consume pre-built Fluent translations at runtime.
Install
fluent-syntax on PyPI
pip
pip install fluent-syntaxuv
uv add fluent-syntaxpoetry
poetry add fluent-syntaxInstalling fluent.syntax
Before you install
Low friction install with a single pure-Python wheel dependency (typing-extensions). Actively maintained as of June 2026 with steady development history since early 2019.
License in practice
Licensed under Apache License 2.0 (permissive), allowing commercial and private use with minimal restrictions.
Quickstart
pip install fluent.syntax
from fluent.syntax import parse, serialize
resource = parse("a-key = String to localize")
resource.body[0].value.elements[0].value = "Localized string"
print(serialize(resource))
Verify before relying
- Whether the package's 'Alpha' status reflects incomplete features or is a legacy classifier from early releases.
- Current Python version support beyond the 3.6–3.9 range listed in classifiers.
Package facts
| License | APL 2 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — typing-extensions |
| Maintenance | actively maintained — 1,247 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 804,824/month — #5,016 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fluent.syntax-0.19.0-py2.py3-none-any.whl
Keywords: fluent, localization, l10n
Tags
More Linguistic packages
Detects and normalizes text encoding from…
permissive · top 100 on PyPI
tiktokentiktoken is a fast BPE tokenizer that converts…
permissive · top 1,000 on PyPI
chardetDetects character encoding and language in byte…
permissive · top 1,000 on PyPI
text-unidecodeConverts Unicode text to ASCII by…
copyleft · top 1,000 on PyPI
larkLark is a parsing library that builds abstract…
permissive · top 1,000 on PyPI
tree-sitterPython bindings to the tree-sitter parsing…
permissive · top 1,000 on PyPI
fluent.pygmentsAdds syntax highlighting support for Fluent…
permissive · top 15,000 on PyPI
babelBabel provides internationalization (i18n) and…
permissive · top 1,000 on PyPI
fugue-sql-antlrParses Fugue SQL dialect into an abstract…
permissive · top 5,000 on PyPI
translate-toolkitTranslate Toolkit converts, validates, and…
copyleft · top 15,000 on PyPI
ansys-api-fluentProvides auto-generated gRPC Python interface…
permissive · top 15,000 on PyPI
surerSurer provides fluent, RSpec-inspired assertion…
permissive · top 15,000 on PyPI
ResourceBundleResourceBundle manages internationalization and…
permissive · top 15,000 on PyPI
ansys-fluent-corePyFluent provides Python bindings to launch and…
permissive · top 15,000 on PyPI
fluent-loggerSends structured event logs from Python…
unclear · top 5,000 on PyPI