# MagicStack/MagicPython

Cutting edge Python syntax highlighter for Sublime Text, Atom and Visual Studio Code. Used by GitHub to highlight your Python code!

Repository: https://github.com/MagicStack/MagicPython
Canonical: https://ross.abutalabs.com/products/magicpython
Language: JavaScript
License: MIT
License Family: permissive
Topics: syntax-highlighter, python, atom, visual-studio-code, sublime-text-3, python-3
Last push: 2024-02-21T21:52:42+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3981, "days_push": 924, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1443, forks 98 (observed 2026-08-28T04:04:44.904089+00:00)

## What it is
MagicPython is a syntax highlighting package for Python 3 (with Python 2 support) built for Sublime Text, Atom, and Visual Studio Code. It accurately highlights modern Python features like type annotations, f-strings, and regular expressions, and is the default Python highlighter in VS Code and GitHub.

## Use cases
- highlight python type annotations correctly in my editor
- fix f-string syntax highlighting in sublime text
- get accurate python regex highlighting in vscode
- replace the default python syntax package in atom
- highlight modern python 3 keywords and magic methods
- use the same python grammar across multiple editors

## When to choose
- you need accurate highlighting of Python 3 features like type hints, f-strings, and raw strings
- you use Sublime Text, Atom, or VS Code and want a robust, well-tested Python grammar
- you want a drop-in replacement for the default Python syntax package

## When to avoid
- you use an editor outside Sublime Text, Atom, or VS Code
- you are a VS Code user who already has the default highlighter and doesn't need the cutting-edge version
- you need highlighting for languages other than Python

## Facets
- artifact type: plugin
- maturity: stable
- function: editor, developer-tools
- domain: developer-tools, text-editors, programming-languages
- platform: editor-plugin, cross-platform
- tags: syntax-highlighting, python, sublime-text, atom, vscode, textmate-grammar

## Member repositories
- MagicStack/MagicPython (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:44.904089+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:36:19.470339+00:00, confidence not recorded.
  - readme: https://github.com/MagicStack/MagicPython (fetched 2026-08-28T04:04:44.904089+00:00, sha 122d85d836de)
- Data as of 2026-08-30T08:39:29.467469+00:00.
