Skip to content

Files

fluent.syntax

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Mar 8, 2021
Jul 26, 2024
Jul 26, 2024
Feb 5, 2019
Mar 13, 2023
May 20, 2020
Mar 10, 2024
Mar 18, 2024
Mar 10, 2024

fluent.syntax fluent.syntax

Read, write, and transform Fluent files.

This package includes the parser, serializer, and traversal utilities like Visitor and Transformer. You’re looking for this package if you work on tooling for Fluent in Python.

>>> from fluent.syntax import parse, ast, serialize
>>> resource = parse("a-key = String to localize")
>>> resource.body[0].value.elements[0].value = "Localized string"
>>> serialize(resource)
'a-key = Localized string\n'

Find the full documentation on https://projectfluent.org/python-fluent/fluent.syntax/.