Registry / serialization / graphtty

graphtty

JSON →
library0.1.8pypypi✓ verified 84d ago

graphtty is a Python library that transforms any directed graph into colored ASCII art, designed for display in your terminal. It is a pure Python solution with zero external dependencies. The library is currently at version 0.1.8 and is actively maintained by UiPath, requiring Python 3.11 or newer.

pip install graphtty
INSTALL
IMPORT
SIG · GRAPHTTY
G
graphtty
serializationpythonv0.1.8
Install
1.5s avg
Import
68ms
Disk
14MB
Pass rate
6/ 10
Env Coverage6 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1.8 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
✕ build_error
✕ build_error
py 3.11
✓ —
✓ 1.65s
py 3.12
✓ —
✓ 1.45s
py 3.13
✓ —
✓ 1.45s
py 3.9
✕ build_error
✕ build_error
14MB installed
● package 14MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

render
from graphtty import render

This quickstart demonstrates how to define a simple directed graph with nodes and edges, then render it as ASCII art in your terminal using `graphtty.render`.

from graphtty import render graph = { "nodes": [ {"id": "start", "name": "Initialize"}, {"id": "step1", "name": "Process Data", "description": "Extract, Transform"}, {"id": "step2", "name": "Analyze Results", "description": "Apply ML Model"}, {"id": "end", "name": "Final Output"} ], "edges": [ {"source": "start", "target": "step1"}, {"source": "step1", "target": "step2"}, {"source": "step2", "target": "end"} ] } ascii_art = render(graph) print(ascii_art)
Debug
Known issues
gotchaBe aware of name collisions with other Python libraries like `graffiti`, `graphiti`, or `graphyte` that serve different purposes (e.g., declarative computation, temporal context graphs, Graphite metrics). Ensure you are importing `graphtty` from the correct package.
fix
Always use `pip install graphtty` and `from graphtty import render` to ensure you're using this specific library.
affects: All
gotchagraphtty is explicitly designed for *directed* graphs. While you can represent undirected relationships by adding two directed edges (A->B and B->A), the rendering will reflect these as distinct directed connections. Attempting to pass a graph structure not adhering to the directed graph format may lead to unexpected visual output.
fix
Structure your graph data with explicit 'source' and 'target' for edges, representing directed relationships. For undirected graphs, explicitly define a reciprocal edge for each connection.
affects: All
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'graphtty'
The graphtty library is not installed in the current Python environment or the environment is not activated.
fix
Run `pip install graphtty` in your terminal to install the package.
TypeError: render() missing 1 required positional argument: 'graph'
`graphtty.render` was called without providing the necessary graph dictionary.
fix
The `render` function expects a dictionary argument that defines the graph's nodes and edges. Ensure you pass a valid graph dictionary, e.g., `render(my_graph_dict)`.
KeyError: 'id' (or 'name') is missing from a node definition.
Node dictionaries within the 'nodes' list of your graph are missing the mandatory 'id' or 'name' keys. These keys are crucial for graphtty to identify and label nodes.
fix
Ensure every node dictionary in your graph includes at least both an 'id' (unique identifier) and a 'name' (display label) key.
Upgrade
Version history
0.1.8latest on PyPI · released Feb 15, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
13 hits · last 30 days
node
10
Resources