Registry / data / asciidag

asciidag

JSON →
library0.2.0pypypiunverified

Asciidag is a Python library that draws Directed Acyclic Graphs (DAGs) as ASCII art, mimicking the output style of `git log --graph`. It is a direct, mechanical port of Git's log graphing code, currently at version 0.2.0. The project is explicitly stated as 'alpha quality' and subject to breaking API changes, with the last release in October 2020.

pip install -U asciidag
INSTALL
IMPORT
SIG · ASCIIDAG
A
asciidag
datapythonv0.2.0
Install
1.6s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.2.0 · 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
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.000s · 17.9MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 1.6s · import 0.000s · 18MB
16MB installed
● package 16MB
Code
Verified usage

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

Graph
from asciidag.graph import Graph
The core Graph object is imported from the 'asciidag.graph' submodule.
Node
from asciidag.node import Node
Node objects, representing elements in the DAG, are imported from 'asciidag.node'.

This quickstart demonstrates how to create a `Graph` object, define `Node`s with parent-child relationships, and then render the DAG to the console using `graph.show_nodes(tips)`.

from asciidag.graph import Graph from asciidag.node import Node graph = Graph() # Define nodes and their relationships (parents) root = Node('root') grandpa = Node('grandpa', parents=[root]) tips = [ Node('child', parents=[ Node('mom', parents=[ Node('grandma', parents=[ Node('greatgrandma', parents=[]), ]), grandpa, ]), Node('dad', parents=[ Node('bill', parents=[ Node('martin'), Node('james'), Node('paul'), Node('jon'), ]) ]), Node('stepdad', parents=[grandpa]), ]), Node('foo', [Node('bar')]), ] # Display the graph graph.show_nodes(tips)
Debug
Known issues
breakingThe library is explicitly labeled as 'alpha quality' and its API is 'subject to breaking API changes' at any time. Users should expect instability in future minor or patch releases, as there is no strong commitment to backward compatibility in the 0.x.x series.
fix
Pin your dependency to a specific patch version (e.g., `asciidag==0.2.0`) and review the GitHub repository for any changes before upgrading.
affects: 0.1.0 to 0.2.0 and future 0.x.x versions
gotchaThe codebase is a 'direct port of the Git log graphing code' and is described as 'not Pythonic'. This means the internal structure and coding conventions might not align with typical Python practices, potentially making it harder to debug or extend.
fix
Be aware that the code style may be unusual. When contributing or debugging, refer to the original Git log graphing logic for context if Pythonic patterns are not immediately apparent.
affects: All versions
Upgrade
Version history
0.2.0latest on PyPI · released Oct 5, 2020
Audit
Dependencies

No dependency data recorded yet.

Agent activity
37 hits · last 30 days
node
30
Bingbot
3
OpenAI (training)
1
Resources
asciidag — pip install asciidag · libregistry