Registry / type-stubs / pygments-styles

pygments-styles

JSON →
library0.3.0pypypiunverified

A curated collection of Pygments styles based on VS Code themes. Current version 0.3.0, released on an as-needed basis (latest update: 2026-04-02). Requires Python >=3.9.

pip install pygments-styles
INSTALL
IMPORT
SIG · PYGMENTS-STYLES
P
pygments-styles
type-stubspythonv0.3.0
Install
2.2s avg
Import
Disk
25MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 26.6MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.2s · import 0.000s · 27MB
25MB installed
● package 25MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

PygmentsStylesRegistry
from pygments_styles import PygmentsStylesRegistry
from pygments_styles import PygmentsStylesRegistry

Quickstart: get a style by name and use it with Pygments.

from pygments import highlight from pygments.lexers import PythonLexer from pygments.formatters import HtmlFormatter from pygments_styles import get_style_by_name code = 'print("Hello, World!")' style = get_style_by_name('github-dark') formatter = HtmlFormatter(style=style) result = highlight(code, PythonLexer(), formatter) print(result)
Debug
Known issues
gotchaStyle names are case-sensitive and must match exactly as documented (e.g., 'github-dark', 'github-light'). Mismatched names raise a ValueError.
fix
Use get_style_by_name() to retrieve a style; it raises clear errors on unknown names.
affects: all
gotchaThe package only provides styles, not lexers or formatters. You must have Pygments installed separately.
fix
Install Pygments: pip install Pygments
affects: all
gotchaSome styles (e.g., 'ayu-mirage') include custom token colors that may not be fully supported by older Pygments versions. Ensure Pygments >=2.7 for best compatibility.
fix
Upgrade Pygments: pip install Pygments>=2.7
affects: 0.2.0+
Upgrade
Version history
0.3.0latest on PyPI · released Nov 4, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
27 hits · last 30 days
node
24
Amazon
1
OpenAI (training)
1
Resources
pygments-styles — pip install pygments-styles · libregistry