Tools for manipulating Directed Acyclic Graphs in Python
Project description
Analyzing DAGs in Python
The dagtools
package provides utilities for computing various
graph-theoretic properties of DAGs (Directed Acyclic Graphs).
Graph Formats and Conversion
The dagtools
package is familiar with the below graph formats, and
can convert between any of them:
- DOT Format
networkx.Graph
and related subclasses
The example below shows how to convert a networkx
Graph into a
DOT formatted string using the dagtools.convert
module. Note, the inverse operation
is also available, via the convert.got_to_graph
function.
>>> import networkx
>>> from dagtools import convert
>>> g = networkx.MultiGraph()
>>> g.add_nodes_from([1, 2, 3])
>>> g.add_edges_from([(1, 2), (1, 3)], key=0)
>>> print(convert.graph_to_dot(g))
graph {
1;
2;
3;
1 -- 2 [key=0];
1 -- 3 [key=0];
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dagtools-0.0.2.tar.gz
(2.4 kB
view details)
Built Distribution
File details
Details for the file dagtools-0.0.2.tar.gz
.
File metadata
- Download URL: dagtools-0.0.2.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5de22bf51db94ea41560faa1bfc197c436bc38615a88de1bf5cd9979fd808bd |
|
MD5 | 63de6648ebf231ad80822bf0aa2a514f |
|
BLAKE2b-256 | 2001ff859becec763116ab8b2a1a32f9624bbe7714e5e335fc4dddba59ff807b |
File details
Details for the file dagtools-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: dagtools-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 38335ed2e350dbcb030a99b9550547330c353635e1ff3c8354d7fb6ad9427647 |
|
MD5 | e29dbd1c5e029e7eeac17c237e1c29b3 |
|
BLAKE2b-256 | a8c90c5bd53ebf9232c52c1dbae8725f076ff498b880355e94dc9db733ebf250 |