pygments/pygments
Pygments is a generic syntax highlighter written in Python observed · 2026-08-28
Health v2 · maintenance only
90/100
- Activity 98
- Release rhythm 74
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 152.5
- age_days: 2559
- days_rel: 16
- days_push: 16
- n_releases_24m: 5
Adoption not part of the score
2204 stars · 867 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
Pygments is a generic syntax highlighter written in Python that supports over 600 languages and text formats. It can be used both as a Python library and as a command-line tool (pygmentize), producing output in formats such as HTML, ANSI terminal sequences, LaTeX, and RTF.
Use cases
- highlight source code in a forum or wiki
- render code snippets as HTML for a blog
- colorize code in the terminal with ANSI output
- add syntax highlighting to a code hosting site
- generate LaTeX listings with highlighted code
- highlight user-submitted code in a web application
- find the language of a code snippet
When to choose
- you need syntax highlighting for many languages in a Python project
- you want a mature, dependency-free highlighting library with a CLI
- you need multiple output formats like HTML, LaTeX, RTF, or ANSI
- you want to add custom lexers or styles via a plugin mechanism
When to avoid
- you need guaranteed bounded execution time on untrusted input (DoS risk from catastrophic regex backtracking)
- you need a full parser or compiler front-end rather than approximate highlighting
- you need highlighting in a non-Python runtime without calling out to Python
Facets
library · maturity stable
parser templating cli developer-tools developer-tools web-development documentation programming-languages python cli cross-platform syntax-highlighting lexers formatters code-prettify ansi-terminal html-output
7 sources
- readme: https://github.com/pygments/pygments · fetched 2026-08-28 · 10ff916d42c2
- homepage: http://pygments.org/ · fetched 2026-08-29 · df70057cbb60
- site_page: https://pygments.org/docs · fetched 2026-08-29 · 3a35406d2109
- site_page: https://pygments.org/docs/changelog · fetched 2026-08-29 · a0bec346093b
- site_page: https://pygments.org/docs/contributing · fetched 2026-08-29 · 5eabc6b82994
- registry_pypi: https://pypi.org/pypi/pygments/json · fetched 2026-08-29 · 6cdc779a132b
- site_page: https://pygments.org/faq · fetched 2026-08-29 · a4c708e869a5
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| pygments/pygments | main | 90 |
For agents
markdown · JSON · MCP: product_card(name="pygments/pygments")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem