Render NetworkX graphs using GraphViz
Project description
nxv
Render NetworkX graphs using GraphViz.
Documentation
Basic Usage
import networkx as nx
import nxv
graph = nx.Graph()
graph.add_edge("A", "B")
graph.add_edge("B", "C")
graph.add_edge("C", "D")
graph.add_edge("B", "E")
style = nxv.Style(
graph={"rankdir": "LR"},
node=lambda u, d: {"shape": "circle" if u in "AEIOU" else "square"},
edge=lambda u, v, d: {"style": "dashed", "label": u + v},
)
nxv.render(graph, style)
Installation
pip install nxv
Development
This repository uses Poetry and Nox to manage the development environment and builds.
To list all Nox sessions:
python -m nox --list-sessions
To run the black code formatter:
python -m nox -rs black
To lint using flake8:
python -m nox -rs lint
To run the test suite:
python -m nox -rs tests
To build the documentation:
python -m nox -rs docs
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
nxv-0.1.1.tar.gz
(16.2 kB
view details)
Built Distribution
nxv-0.1.1-py3-none-any.whl
(26.1 kB
view details)
File details
Details for the file nxv-0.1.1.tar.gz
.
File metadata
- Download URL: nxv-0.1.1.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/5.4.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e0eb7cb86e251b4621388626522a377bf67b5ff9aca6abd2edf75eb313f161f5 |
|
MD5 | 369aa5632017f46d3a0cb33e0419d999 |
|
BLAKE2b-256 | 9e3c2ff8d74822f5d4680018630af007af6a318fee33502a8958e8f46fb3c72c |
File details
Details for the file nxv-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: nxv-0.1.1-py3-none-any.whl
- Upload date:
- Size: 26.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.10 CPython/3.8.5 Linux/5.4.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 964dfb2f9f2c513686707536ba1d0fb3eb0ab82ddc4574982db1b08640bd3083 |
|
MD5 | ef9df15b9f1e7849dfbea4c26874e390 |
|
BLAKE2b-256 | 4c7363c00709dd5281be547dedc6c9fded488b568ee324bd711e1bed284ccd4d |