fluent.pygments
Pygments lexer for Fluent.
What it is and what it does
fluent.pygments is a Pygments lexer plugin that teaches Pygments how to recognize and highlight Fluent localization syntax. Fluent is a localization system designed to make it easier to express complex plural rules, gender agreement, and other linguistic nuances in application strings. This package integrates that syntax highlighting into Pygments, which means it works with any tool that uses Pygments—most notably Sphinx documentation generators.
The package depends on Pygments itself, fluent.syntax (the Fluent parser and utilities), and six (for Python 2/3 compatibility). It's a small, focused tool: if you're documenting Fluent files or displaying Fluent code in a Sphinx project, this lexer makes that code readable with proper syntax coloring. Without it, Fluent code appears as plain text.
Use it for:
- Add colored Fluent syntax to Sphinx documentation for localization projects
- Display Fluent localization files with proper highlighting in code examples
- Enable syntax-aware rendering of Fluent code in documentation generation pipelines
- Provide IDE-like syntax highlighting for Fluent in any Pygments-based tool
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds syntax highlighting support for Fluent localization files to Pygments, enabling syntax-colored display of Fluent code in documentation tools like Sphinx.
Yes, if you use Sphinx or another Pygments-based tool and need to display Fluent localization code with syntax highlighting. Install it as a dependency of your documentation build. The low friction, permissive license, and active repository make it a straightforward addition. However, note that the last release was in 2020; verify compatibility with your current Pygments version before relying on it in production documentation.
Install
fluent-pygments on PyPI
pip
pip install fluent-pygmentsuv
uv add fluent-pygmentspoetry
poetry add fluent-pygmentsInstalling fluent.pygments
Before you install
Low friction installation with a pure-Python wheel and minimal dependencies. The package is actively maintained with recent commits, though it has not seen a release since 2020-05-20.
License in practice
Licensed under Apache License, Version 2.0 (permissive), allowing use in both open-source and proprietary projects with minimal restrictions.
Quickstart
pip install fluent.pygments
from pygments import highlight
from pygments.lexers import get_lexer_by_name
from pygments.formatters import TerminalFormatter
lexer = get_lexer_by_name('fluent')
code = 'hello = Hello, { $name }!'
print(highlight(code, lexer, TerminalFormatter()))
Verify before relying
- Whether the package works with current Pygments versions despite the last release being in 2020
- Compatibility with Python versions beyond 3.5 given the classifier dates
Package facts
| License | APL 2 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — pygments, fluent.syntax, six |
| Maintenance | actively maintained — 2,277 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 442,982/month — #6,632 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fluent.pygments-1.0-py2.py3-none-any.whl
Keywords: fluent, pygments
Tags
More Sphinx packages
Parses Python docstrings in ReST, Google,…
permissive · top 1,000 on PyPI
SphinxSphinx generates professional documentation…
permissive · top 1,000 on PyPI
sphinxcontrib-serializinghtmlA Sphinx extension that outputs documentation…
permissive · top 1,000 on PyPI
alabasterAlabaster is a clean, responsive Sphinx theme…
permissive · top 1,000 on PyPI
sphinxcontrib-htmlhelpA Sphinx extension that generates HTML help…
permissive · top 1,000 on PyPI
sphinxcontrib-qthelpA Sphinx extension that converts documentation…
permissive · top 1,000 on PyPI
fluent.syntaxParse, write, and transform Fluent localization…
permissive · top 15,000 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
ipython-pygments-lexersProvides Pygments syntax highlighters for…
permissive · top 1,000 on PyPI
ansible-pygmentsProvides a Pygments lexer and style for…
permissive · top 15,000 on PyPI
pygments-stylesProvides a curated collection of Pygments…
permissive · top 15,000 on PyPI
ansys-api-fluentProvides auto-generated gRPC Python interface…
permissive · top 15,000 on PyPI
ansys-fluent-corePyFluent provides Python bindings to launch and…
permissive · top 15,000 on PyPI
jupyterlab-pygmentsProvides a Pygments syntax highlighting theme…
permissive · top 1,000 on PyPI
accessible-pygmentsProvides a collection of WCAG 2.1-compliant…
permissive · top 5,000 on PyPI
types-PygmentsProvides type hints for the Pygments syntax…
permissive · top 5,000 on PyPI