mermaid-ascii (PyPI packaging)
This repository rebundles the upstream mermaid-ascii (written in Go) and publishes it to PyPI as a Python package. It exists to make Mermaid → ASCII conversion trivial to install and use from Python and in CI, without requiring Node, Graphviz, or a JVM.
Upstream author: Alexander Grooff This repo is a packaging/redistribution project and is not affiliated with the upstream authors.
What you get
- A prebuilt
mermaid-asciibinary shipped inside the wheel. - A tiny Python wrapper for programmatic use (
mermaid_to_ascii(...)). - Optional CLI access via your Python environment (see Usage).
This lets you:
- Convert Mermaid diagrams to ASCII in terminals and CI logs
- Call the converter directly from Python, Jupyter, or scripts
Install
pip install mermaid-ascii
We publish wheels for common platforms. If a wheel isn’t available for your platform yet, please open an issue.
Quick start
CLI
# From a file
mermaid-ascii -i diagram.mmd
# From stdin
echo 'flowchart LR; A-->B' | mermaid-ascii -i -
Python API
from mermaid_ascii import mermaid_to_ascii
src = """
flowchart TB
A[Start] --> B{Question?}
B -->|Yes| C[Go]
B -->|No| D[Stop]
"""
print(mermaid_to_ascii(src))
Jupyter tip
JupyterLab ≥ 4.1 / Notebook ≥ 7.1 can render Mermaid natively for visual preview:
```mermaid
flowchart LR
A --> B
```
Use this package when you specifically need ASCII output (for terminals, logs, or text-only artifacts).
Versioning
- The Python package version matches the upstream
mermaid-asciitag, with a leadingvstripped if present (e.g., upstreamv0.6.1→ package0.6.1). - Each release of this package corresponds to the latest upstream release at the time of packaging.
How this repo works (release automation)
-
CI clones the upstream AlexanderGrooff/mermaid-ascii repo and detects its latest tag.
-
If that version differs from this package’s version in
pyproject.toml(annotated with# mermaid-ascii version), CI:- Updates
pyproject.tomlto the new version - Builds the upstream Go binary
- Bundles the binary into the Python wheel
- Publishes to PyPI
- Creates a GitHub tag + release in this repo
- Updates
-
If nothing changed, CI exits without publishing.
This keeps the PyPI package in lockstep with upstream releases.
Platforms
We aim to provide wheels for:
- Linux (x86_64, aarch64)
- macOS (arm64, x86_64)
- Windows (x86_64)
If your platform isn’t covered, please open an issue with details (OS, architecture, Python version).
Troubleshooting
-
mermaid-ascii: command not foundEnsure your Python environment’sbin/Scriptsis onPATH. Alternatively, invoke via Python:python -m mermaid_ascii -i diagram.mmd
(If unavailable, use the Python API example above.)
-
Non-ASCII terminals Output uses Unicode box-drawing characters. If your terminal can’t display them, switch to a UTF-8–capable font/locale.
-
Diagram doesn’t render as expected Please first confirm the diagram renders in a Mermaid viewer. If the ASCII rendering is the problem, open an issue here; if it’s Mermaid syntax/semantics, consider filing upstream.
Contributing
- Packaging changes and Python wrapper issues → this repo
- Core ASCII rendering behavior → upstream: https://github.com/AlexanderGrooff/mermaid-ascii
PRs are welcome for:
- Additional wheels/platforms
- CI improvements
- Small Python wrapper enhancements (docs, examples)
License & attribution
- The included
mermaid-asciibinary and its source are licensed by the upstream project. - The packaging code in this repository is licensed as stated in this repo’s LICENSE file.
- © Respect to the upstream author(s). This project simply repackages their work for PyPI distribution.
Maintainers
- Open Science Labs – OSL Packages Repo: https://github.com/osl-packages/mermaid-ascii
If you rely on this package, consider starring both this repo and the upstream to support the maintainers.
Metadata
Release files for mermaid-ascii 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 194.0 MB
Release files / mermaid_ascii-1.2.0-cp314-cp314-win_amd64.whl
| Download URL | mermaid_ascii-1.2.0-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 19.5 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
af1f836754b1375ab7c109924dd520b6a9926602eb4e39c4b772eefe6f78aa0d
|
|
BLAKE2b-256 checksum How to use checksums |
afb65e815ac9fbd5d743695b2db70e0986835534e4739b14444355478e1cf850
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / mermaid_ascii-1.2.0-cp314-cp314-manylinux_2_39_x86_64.whl
| Download URL | mermaid_ascii-1.2.0-cp314-cp314-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 9.9 MB |
| Tags | CPython 3.14 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
9b265ebaf40d6c59041d7f1f31dd5486a04c7cdb624c417f5d57ac122d738afd
|
|
BLAKE2b-256 checksum How to use checksums |
03f751e9d8552af2991573f34f0e3f125468c5317f96b5f35fc82d17551f3ac1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / mermaid_ascii-1.2.0-cp314-cp314-macosx_15_0_arm64.whl
| Download URL | mermaid_ascii-1.2.0-cp314-cp314-macosx_15_0_arm64.whl |
|---|---|
| Size | 9.5 MB |
| Tags | CPython 3.14 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
49c72145cb00535d161d11e3d0ca317eadf9a4e751f53bff9ba3bf8d104d0ca3
|
|
BLAKE2b-256 checksum How to use checksums |
7131b5245686cc95a384afd85b2a675fb728d127b241ede9f6e7b4acbfc68d0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / mermaid_ascii-1.2.0-cp313-cp313-win_amd64.whl
| Download URL | mermaid_ascii-1.2.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 19.3 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9e8587e27edac01cad3a766bf47c95573532acbbbf19d680aff685ee97edddb2
|
|
BLAKE2b-256 checksum How to use checksums |
9a263c42ff3f6369c46909593f2ad84c204d6829347bfeea368b0443a146eb8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / mermaid_ascii-1.2.0-cp313-cp313-manylinux_2_39_x86_64.whl
| Download URL | mermaid_ascii-1.2.0-cp313-cp313-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 9.9 MB |
| Tags | CPython 3.13 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
9f394a3bf23b01435cd0b1ee18c5ba25bbcf214a5a8c2a988d6eef92e47b1dd1
|
|
BLAKE2b-256 checksum How to use checksums |
41b52f75928e47107268f50e29e7a06636f52b74135eaec380a0442d23f38414
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / mermaid_ascii-1.2.0-cp313-cp313-macosx_15_0_arm64.whl
| Download URL | mermaid_ascii-1.2.0-cp313-cp313-macosx_15_0_arm64.whl |
|---|---|
| Size | 9.5 MB |
| Tags | CPython 3.13 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
11bbf8e4f143802bef9e3c251e3eb69c9ac94d4d0d7e10a203475e0498910d69
|
|
BLAKE2b-256 checksum How to use checksums |
7346166ad4b3224fae05459ee8043d97bb51d1a1abedac1e50cf68a23e2cdc58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / mermaid_ascii-1.2.0-cp312-cp312-win_amd64.whl
| Download URL | mermaid_ascii-1.2.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 19.3 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
6081cc8d90df717887505c9fb8fa0481c03f2f4ffdd927e20ee278f31e841ca0
|
|
BLAKE2b-256 checksum How to use checksums |
5ba189b6a6dc0fdfc2120c5df7a9b45e1289a5da88e6a4b771985969f452c465
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / mermaid_ascii-1.2.0-cp312-cp312-manylinux_2_39_x86_64.whl
| Download URL | mermaid_ascii-1.2.0-cp312-cp312-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 9.9 MB |
| Tags | CPython 3.12 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
767f1cd2c056d2e8e7b8ec9cc421504623d6230539beb85834a6128ea5461312
|
|
BLAKE2b-256 checksum How to use checksums |
5a1ff14c062e9819b5261ee32d39922ccd53a643c638583732a441aea0c2e137
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / mermaid_ascii-1.2.0-cp312-cp312-macosx_15_0_arm64.whl
| Download URL | mermaid_ascii-1.2.0-cp312-cp312-macosx_15_0_arm64.whl |
|---|---|
| Size | 9.5 MB |
| Tags | CPython 3.12 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f42fba950a84997efd3c9c332ac215f70f4735a76bd86aa96f479c51a06b9f2a
|
|
BLAKE2b-256 checksum How to use checksums |
6c9aea2db564f79e173303dc87366415e01af0da82f42f3e7244870e16b04fbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / mermaid_ascii-1.2.0-cp311-cp311-win_amd64.whl
| Download URL | mermaid_ascii-1.2.0-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 19.3 MB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9222e93b21bd92c815fb9b272401a302c6f89fd865c437b5dd491482e10b0529
|
|
BLAKE2b-256 checksum How to use checksums |
dcd870866e13ebad0f5a33bdc5a2d8d18fc45a1deabbb27b1b52fe51ce948977
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / mermaid_ascii-1.2.0-cp311-cp311-manylinux_2_39_x86_64.whl
| Download URL | mermaid_ascii-1.2.0-cp311-cp311-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 9.9 MB |
| Tags | CPython 3.11 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
79e137f9c7e1b1df2b3ba90817b8c0db120e6db1bc1f292ae77901f2ec33ee08
|
|
BLAKE2b-256 checksum How to use checksums |
78d84c0602e4ace67005afdb1b6e8fb7a31c7ac4f286caebbdc91e499bcc493f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / mermaid_ascii-1.2.0-cp311-cp311-macosx_15_0_arm64.whl
| Download URL | mermaid_ascii-1.2.0-cp311-cp311-macosx_15_0_arm64.whl |
|---|---|
| Size | 9.5 MB |
| Tags | CPython 3.11 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
95e8636c83468d8ff198f64ffe45c8747390906cac09040c6b88f6d50c8a26bc
|
|
BLAKE2b-256 checksum How to use checksums |
fd902813cd484bb4685a89c1a785e2e711855eb2e4bbbc8843f32b3938dbf2cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / mermaid_ascii-1.2.0-cp310-cp310-win_amd64.whl
| Download URL | mermaid_ascii-1.2.0-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 19.3 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9910c2126e546e1d284dfbe1e0004898c0b3b8180b05a1ee5bd2b4625e38455a
|
|
BLAKE2b-256 checksum How to use checksums |
c4db3464a53d96dd562d044b20093e250a8b07bf2da2978d2e25c335aa3ccfaf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / mermaid_ascii-1.2.0-cp310-cp310-manylinux_2_39_x86_64.whl
| Download URL | mermaid_ascii-1.2.0-cp310-cp310-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 9.9 MB |
| Tags | CPython 3.10 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
fae27d088909e7087fbfdc35031aec9518208e679caa3ce9d18c0235d098b660
|
|
BLAKE2b-256 checksum How to use checksums |
883653c1e830837e1da0ae6977669bc21001643989e69fd5bb022cc145f04c76
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / mermaid_ascii-1.2.0-cp310-cp310-macosx_15_0_arm64.whl
| Download URL | mermaid_ascii-1.2.0-cp310-cp310-macosx_15_0_arm64.whl |
|---|---|
| Size | 9.5 MB |
| Tags | CPython 3.10 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
b5b39f7f11829f8421966901383b27148eca3c32b71d8ad041d696e3cfb79b16
|
|
BLAKE2b-256 checksum How to use checksums |
c5d4a778c5bc7342dd112384021155c2911c5771dc2981770fc384eb5ff89b2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|