Skip to main content
# pygraph
pygraph is an extremely simple CLI tool for using graphviz. It takes a file to write to and
adjacency list to construct the graph from. The intended use case is for generating
small graphs to embed in things like homework problems. The API is documented via the `--help`
option

## Examples
```bash
pygraph -d tree ab ac bd be

pygraph -u -e neato circle ab bc cd de ea

pygraph -d -n "Sample Tree" labeled-tree root-left:1 root-right:1 left-child:4 right-child:3 root-root:0
```

![tree](examples/tree.png)
![circle](examples/circle.png)
![labeled-tree](examples/labeled-tree.png)

## Usage
```bash
$ pygraph --help
Usage: pygraph [OPTIONS] FILE EDGES...

Options:
-e, --engine [dot|neato|twopi|circo|fdp|sfdp|patchword|osage]
Choose layout engine to use
-u, --undirected / -d, --directed
Specify undirected or directed edges
--format TEXT Image format
-n, --name TEXT Name of graph in image
--dot Preserve the source dot file
--no-vertex-labels Don't label vertex labels
--help Show this message and exit.
```

### Installation
```bash
pip install pygraph-cli
```

### Syntax
* First argument is file to save to without extension
* Pairs of single characters after are interpreted as creating an edge between the them (eg: `ab ac cd`)
* Nodes can have any name when separated by `-` (eg: `root-child`)
* To label the edge, append `:` and any text (eg: `root-child:label`)
* Name the image by passing `-n` option
* To keep the original dot source, pass `--dot`

Metadata

Release files for pygraph-cli 0.1.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 pygraph-cli 0.1.0
File Size Uploaded Provenance Actions
pygraph-cli-0.1.0.tar.gz 3.7 kB Without provenance Details for pygraph-cli-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pygraph-cli 0.1.0
File Interpreter ABI Platform Actions
pygraph_cli-0.1.0-py2.py3-none-any.whl Python 2, Python 3 none any Details for pygraph_cli-0.1.0-py2.py3-none-any.whl

Total release size: 7.5 kB

Release files / pygraph-cli-0.1.0.tar.gz

Download URL pygraph-cli-0.1.0.tar.gz
Size 3.7 kB
Tags Source
SHA-256 checksum
How to use checksums
8cf60bd78831494a38eb5b493978a1620ef819abd7bdb748008f14ddd8697957
BLAKE2b-256 checksum
How to use checksums
a16cbd6293b7edf8b51229c87c2972bda7a2027921ab4216bf309a3efd3743d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pygraph_cli-0.1.0-py2.py3-none-any.whl

Download URL pygraph_cli-0.1.0-py2.py3-none-any.whl
Size 3.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0b5be49988cacfd237af594bb2fa6e451e862feefe756dcdcff22a9ff48c6a87
BLAKE2b-256 checksum
How to use checksums
582ddda3452b22092ee020318868a73cd9b38313b9f2f6769e5186097fc6619b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pygraph-cli 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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