Skip to main content

Pygments lexer for Michelson contracts

Project description

Pygments Lexer for Michelson contracts

A lexer class for Michelson contracts.

Installing

From pip:

# pip --user install pygments-michelson-1.0.0

Usage

On the command line

$ pygmentize contract.tz

From python script to generate HTML

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()))

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pygments-michelson, version 1.0.1
Filename, size File type Python version Upload date Hashes
Filename, size pygments_michelson-1.0.1-py3-none-any.whl (3.6 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page