Skip to main content

Render NetworkX graphs using GraphViz

Project description

nxv

PyPI Status Tests Documentation Status Codecov

Render NetworkX graphs using GraphViz.

Documentation

https://nxv.readthedocs.io/

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


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.3.tar.gz (16.2 kB view details)

Uploaded Source

Built Distribution

nxv-0.1.3-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file nxv-0.1.3.tar.gz.

File metadata

  • Download URL: nxv-0.1.3.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

Hashes for nxv-0.1.3.tar.gz
Algorithm Hash digest
SHA256 51e98bb6490ba4f36bce9a7667d887546fa7ef5910425ba846d759f79c10b655
MD5 fbe14bf406fad7b22580016f593640f7
BLAKE2b-256 b034938f0847f0a822efd06ca3f808cdf9dab58c8b4e546ea143ab1a7a77a894

See more details on using hashes here.

File details

Details for the file nxv-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: nxv-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 26.2 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

Hashes for nxv-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8cdc6f0d1e64176a2a82d1fdfb833bf7e8b4cf89732a39c0a625b3042a8560fc
MD5 a93db9d9c610b61c05b15e4948668134
BLAKE2b-256 7849a8311e60e1f4670232d4290523b9223e8f10c81fa93e631695c89ea591e6

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page