skillfed

fluent.syntax

Localization library for expressive translations.

fluent-syntax v0.19.0 804.8K downloads/30d#5,016 on PyPI244
Permissive license APL 2 Active released

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-syntax

uv

uv add fluent-syntax

poetry

poetry add fluent-syntax

Installing 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

Development Status :: 3 - AlphaIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

fluent localization parserfluent file syntaxl10n message formatfluent ast manipulationlocalization file tooling
localizationparsingast-manipulation

More Linguistic packages