Skip to main content

asciidag - draw DAGs as ASCII art

Travis CI status AppVeyor CI status Coverage Requirements Status

Overview

This is a direct port of the Git log graphing code, which draws directed acyclic commit graphs as ASCII art. It was done very mechanically and quickly, so the code is not Pythonic. Dependencies on Git specifics should be gone but look and feel remains.

This project is alpha quality and subject to breaking API changes.

Installation

Available for install/upgrade from PyPI:

pip install -U asciidag

As usual, it is best to install your packages into a virtual environment.

Usage

examples/demo.py is included in the installation directory and is executable. The core functionality is:

from asciidag.graph import Graph
from asciidag.node import Node

graph = Graph()

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')]),
]

graph.show_nodes(tips)

Output:

Demonstration screenshot
copyright:

© 2016 Sam Brightman

license:

GNU General Public License v2.0, see LICENSE for more details.

Metadata

Release files for asciidag 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asciidag 0.2.0
File Size Uploaded
asciidag-0.2.0.tar.gz 133.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for asciidag 0.2.0
File Interpreter ABI Platform
asciidag-0.2.0-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 153.5 kB

Release files / asciidag-0.2.0.tar.gz

Download URL asciidag-0.2.0.tar.gz
Size 133.4 kB
Tags Source
SHA-256 checksum
How to use checksums
acf4df123fc222322467d9bdb2020e44b4e1af37d38129092a080c3cda54a788
BLAKE2b-256 checksum
How to use checksums
877a2241c6cc1cd1c34b10ba8ced7cd4b9b47c6609fcb186f4bf2826a2f0b43c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

Release files / asciidag-0.2.0-py2.py3-none-any.whl

Download URL asciidag-0.2.0-py2.py3-none-any.whl
Size 20.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f7ea1e6a867ab4c3a2537ff03bc0f25d8fccc2d5109f9f329220ba4fbb1b3e02
BLAKE2b-256 checksum
How to use checksums
109b00885406d04e6bcad4c51a5bff2a92b6d73ef322d8b30916fe3d28bb2c48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page