Hey, I’ve just finished porting, extending, and packaging a pure python (only using system modules) port of John MacFarlanes stmd.js implementation. I added on further HTML entity unescaping (as done in the C version) and href URL % quoting as well as JSON output of the AST. Much like most of the other ports/implementation I won’t do a v1.0 release until the spec is considered stable and will attempt to keep up with changes, but for now I’ve released a v0.5.0 version, you can get it from PyPi, here, or just typing
$ pip install commonmark
If you find any bugs/etc the GitHub repo can be found here. Note: If you use python 3.3 or lower you may see artifacts where HTML entities won’t be properly unescaped, I am currently working on a workaround for this… NOTE NOTE I fixed this, all versions now unescape HTML5 entities properly!