hascii
Convert Graphviz DOT graphs to Unicode box-drawing art
Embed readable flow diagrams in docstrings, source code, and plain-text docs.
No image viewer needed — just Unicode text.
What it does
Takes a Graphviz DOT graph and renders it as ASCII art with box-drawing characters:
┌───────┐
│ Start │◀─┐
└───────┘ │
│ │retry
│ │
▼ │
┌───────┐ │
│ Check │──┘
└───────┘
│ok
│
▼
┌──────┐
│ Done │
└──────┘
Back-edges, conditions, and edge labels
┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐
┌─▶┆ router_while_simple_flow_while_i_lt_max_iterations ┆
│ └┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
│ │p['i'] < p['max_iterations']
│ └─────────────────────────────────┐
│ │ │else
│ ▼ ▼
│ ┌┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┐ ┌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┐
│ ┆ router_while_simple_flow_seq_set_i ┆ ╎ handler_finalize ╎
│ ┆ p['i'] += 1 ┆ └╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┘
│ └┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┘
│ ┌─────────────────┘
│ ▼
│ ┏┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┓
└──┇ handler_process ┇
┗┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┅┛
Subgraph grouping
Cluster subgraphs render as dashed group boxes:
┌────────────┐
│ preprocess │
└────────────┘
│
┌ validation_stage ╌╌╌┐
╎ ▼ ╎
╎ ┌──────────┐ ╎
╎ │ validate │ ╎
╎ └──────────┘ ╎
╎ │ ╎
╎ ▼ ╎
╎ ┌────────┐ ╎
╎ │ enrich │ ╎
╎ └────────┘ ╎
└╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┘
│
▼
┌───────┐
│ store │
└───────┘
Color modes
Node fill colors are conveyed through border styles (B/W) or ANSI colors (terminal):
| Mode | Borders | When |
|---|---|---|
| ANSI colors | ┌──┐ + colored |
Terminal (default), Python color=True |
| Hue borders | ┌┄┄┐ ┏┅┅┓ ┌╌╌┐ |
CLI --no-color, piped output |
| Plain | ┌──┐ uniform |
Python color=False |
Hue border reference
| Border | Color family | Example fills |
|---|---|---|
┌──┐ solid |
Green | palegreen |
┌┄┄┐ light triple-dash |
Orange/Yellow | wheat, gold |
┌╌╌┐ light double-dash |
Red | lightsalmon |
┏┅┅┓ heavy triple-dash |
Blue | lightblue |
┏╍╍┓ heavy double-dash |
Purple/Pink | plum |
┏━━┓ heavy solid |
Dark | black |
Quick start
Try without installing (requires uv and Graphviz):
echo 'digraph { A -> B -> C }' | uvx hascii -
uvx hascii flow.dot
uvx hascii - < flow.dot
Install
Graphviz is a required system dependency (hascii uses dot for layout):
sudo apt-get install graphviz # Debian/Ubuntu
brew install graphviz # macOS
Python:
pip install hascii
Rust CLI:
cargo install hascii
Python API
import hascii
dot = '''
digraph {
A [label="Start"]; B [label="End"];
A -> B;
}
'''
# ANSI colors (default) — for terminal display
print(hascii.render(dot))
# Plain solid borders — for docstrings and source code
print(hascii.render(dot, color=False))
# All options
hascii.render(
dot_source,
max_width=72, # constrain output width
trim="smart", # label trimming: end, start, middle, smart
max_label=30, # max label length
color=False, # True: ANSI colors, False: plain borders
)
# From file
hascii.render_file("flow.dot", color=False)
CLI
hascii [OPTIONS] <FILE>
Arguments:
<FILE> Path to a .dot file, or "-" to read from stdin
Options:
--width <N> Max output width in characters
--trim <STRAT> Label trimming strategy [default: smart]
--max-label <N> Max label width in characters
--no-color Use hue-based border styles instead of ANSI colors
-v, --verbose... Increase verbosity
-h, --help Print help
# Render a DOT file (colors on terminal)
hascii flow.dot
# Pipe from stdin
echo 'digraph { A -> B }' | hascii -
# Save to file (hue-based borders, no ANSI)
hascii --no-color flow.dot > flow.txt
# Constrain for docstrings
hascii --width 72 --max-label 25 flow.dot
Rust API
use hascii::{render, RenderOptions};
let dot = r#"digraph { A -> B -> C }"#;
let options = RenderOptions::default();
let ascii = render(dot, &options).expect("render failed");
println!("{ascii}");
Label trimming
Long labels are trimmed with --trim / trim=:
| Strategy | Result (budget 25) |
|---|---|
smart (default) |
router_text...threshold |
end |
router_text_impro... |
start |
...score_ge_threshold |
middle |
router_te...threshold |
License
Apache-2.0
Metadata
Release files for hascii 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 5.3 MB
Release files / hascii-0.1.3-cp313-cp313-win_amd64.whl
| Download URL | hascii-0.1.3-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 286.5 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
fbf1c900e54c5339e85748cf1a35e81d2fc20cb3b8e603d3ae7aedbcdc993f47
|
|
BLAKE2b-256 checksum How to use checksums |
0b746c7467ee45915a0d53505b47e142cb78fe8036f93bd7a6f08355199cdaee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2026.
Transparency logRelease files / hascii-0.1.3-cp313-cp313-manylinux_2_39_x86_64.whl
| Download URL | hascii-0.1.3-cp313-cp313-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 420.5 kB |
| Tags | CPython 3.13 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
edb83fb1e066d3064f695fbabb81c383f38ba23f8e908f06c8f672ff0db81d5d
|
|
BLAKE2b-256 checksum How to use checksums |
b8df81d2ae6f98489ad589e63de4491512537509b8bc2c996ebb2cc2ccf629aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2026.
Transparency logRelease files / hascii-0.1.3-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | hascii-0.1.3-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 358.5 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e511e5fd985af195aaac167c5a86bca88aa8d5004031f9f6c00a2b2d8697a2a0
|
|
BLAKE2b-256 checksum How to use checksums |
daecab1cabb7a8ad67933acd68e7f4d3af67897ff3cc021e54b6b4f1399da305
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2026.
Transparency logRelease files / hascii-0.1.3-cp312-cp312-win_amd64.whl
| Download URL | hascii-0.1.3-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 287.1 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
c2197fe311528554430a7838bbddc4e5e75edca4e81664b4a03ef10806c15db8
|
|
BLAKE2b-256 checksum How to use checksums |
94575c91731dc1b57d8042a0d82615e7aa941198f937506fbe86ed0c8eadbffd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2026.
Transparency logRelease files / hascii-0.1.3-cp312-cp312-manylinux_2_39_x86_64.whl
| Download URL | hascii-0.1.3-cp312-cp312-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 421.3 kB |
| Tags | CPython 3.12 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
03ec453dd98214a2488fe941cc0ed6056eeb1ecc1d0f6ecf5a083389353c5baa
|
|
BLAKE2b-256 checksum How to use checksums |
d5021c8e23bf99b967a653a8b5da06dc5ba33b0cc298a486f475ee300901fe40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2026.
Transparency logRelease files / hascii-0.1.3-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | hascii-0.1.3-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 358.9 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
de888a21972781ff86569eca0bd3a3d8b428d47647664fd20fbf248b027910b5
|
|
BLAKE2b-256 checksum How to use checksums |
07dca2d93e73536218e1bb7abbf5d2c7c6e7bb8607afb23f2e0bc79655f0d6ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2026.
Transparency logRelease files / hascii-0.1.3-cp311-cp311-win_amd64.whl
| Download URL | hascii-0.1.3-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 287.1 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
0bdcbe6453f4555f7fe5b7581d1d456a039b6238f50f5c6726bad1328931a369
|
|
BLAKE2b-256 checksum How to use checksums |
7976d5b7879ce72df8ed0f4858f49a269535a4135f8083784fda9649eeb91f1b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2026.
Transparency logRelease files / hascii-0.1.3-cp311-cp311-manylinux_2_39_x86_64.whl
| Download URL | hascii-0.1.3-cp311-cp311-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 420.7 kB |
| Tags | CPython 3.11 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
c66937b9cc63f29ee0dd04b10fd617490ef0856fedbac971b6c96e517165cd41
|
|
BLAKE2b-256 checksum How to use checksums |
cccd896ae2354dba934c29efe8161402d7fb0afbf316aa5048815d18c8ac23ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2026.
Transparency logRelease files / hascii-0.1.3-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | hascii-0.1.3-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 362.6 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
8deceeb0b5b32cee97ea82b64aa1bebdd40b252bf5d68713d074248fd5b3de6a
|
|
BLAKE2b-256 checksum How to use checksums |
fc732146a07582b60bba9d93170ce1040edc034fd41f5b17044210f1d62a23ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2026.
Transparency logRelease files / hascii-0.1.3-cp310-cp310-win_amd64.whl
| Download URL | hascii-0.1.3-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 287.0 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
60d5423ee15b5ba3e6e16223c675872fceaa8964199428bfae151ed6481bcbf6
|
|
BLAKE2b-256 checksum How to use checksums |
d3c93f071a632d5b9db8439f9c901e36e6dcf9bf0090e21e3e8cfa08d0e4c13b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2026.
Transparency logRelease files / hascii-0.1.3-cp310-cp310-manylinux_2_39_x86_64.whl
| Download URL | hascii-0.1.3-cp310-cp310-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 420.8 kB |
| Tags | CPython 3.10 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
4bfa7c73825c2eb7178002d28b50d1f4a1365cc95dca8870a8e91f87a6f641d1
|
|
BLAKE2b-256 checksum How to use checksums |
a554cdd8897f4d29dd082ae58600e0cfde21ef6aaedf90fc223dcd534288893c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2026.
Transparency logRelease files / hascii-0.1.3-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | hascii-0.1.3-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 362.6 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
0d05e8a2e27cadbb5ad944ab4b34d03d6425a28483e3d01d5b03c52ae63fc33e
|
|
BLAKE2b-256 checksum How to use checksums |
0d22088a4de531fed98d52f4bb5cfad33ccf9415a2d2ecd54d996971e4f73b04
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2026.
Transparency logRelease files / hascii-0.1.3-cp39-cp39-win_amd64.whl
| Download URL | hascii-0.1.3-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 287.0 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
96780a456ca874f30ee42529495994564acd173c0cce11a13eb145cb4f63e32e
|
|
BLAKE2b-256 checksum How to use checksums |
dde9057a141ce9053cff00dc0f03f92a7d77f7be813222e5d92ade9332c61edb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2026.
Transparency logRelease files / hascii-0.1.3-cp39-cp39-manylinux_2_39_x86_64.whl
| Download URL | hascii-0.1.3-cp39-cp39-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 421.2 kB |
| Tags | CPython 3.9 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
8fd7d4efa56c9088c61c1492a695b0bdf234af074ddd2b99770060d0dd99ce94
|
|
BLAKE2b-256 checksum How to use checksums |
251880f6ea386238f4d6cf217550f68092dc8e7bbad046fd77772af02fb162d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2026.
Transparency logRelease files / hascii-0.1.3-cp39-cp39-macosx_11_0_arm64.whl
| Download URL | hascii-0.1.3-cp39-cp39-macosx_11_0_arm64.whl |
|---|---|
| Size | 362.7 kB |
| Tags | CPython 3.9 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
bb268296b192642130a3d1f3895c933972f90fa1cff4f475ef5d024a913191cb
|
|
BLAKE2b-256 checksum How to use checksums |
25f41b61394fd0a67706ed2a78ef7538039348bdcfe0ba8be7c0027118e806ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 14, 2026.
Transparency log