pygments/pygments
Some data may be outdated — see provenance labels.
Pygments is a generic syntax highlighter written in Python observed · 2026-09-26
Health v2 · maintenance only
84/100
- Activity 90
- Release rhythm 66
- Longevity 100
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-10-21. Adoption (stars, forks) is never an input.
- gap_med: 152.5
- age_days: 2607
- days_rel: 64
- days_push: 64
- n_releases_24m: 5
Adoption not part of the score
2210 stars · 889 forks observed · 2026-09-26
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-09-26 · 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 | 84 |
For agents
markdown · JSON · MCP: product_card(name="pygments/pygments")
Data as of 2026-10-19T08:05:51.212177+00:00 · Report a problem