Pygments lexer for Michelson contracts
pip install pygments-michelson==1.0.1
A lexer class for Michelson contracts.
From pip:
# pip --user install pygments-michelson-1.0.0
$ pygmentize contract.tz
from pygments import highlight
from pygments_michelson import MichelsonLexer
from pygments.formatters import HtmlFormatter
code = 'parameter unit; storage unit; code { CDR; NIL operation; PAIR };'
print(highlight(code, MichelsonLexer(), HtmlFormatter()))