nr-util

0.8.12 · active · verified Thu Apr 16

nr-util is a general-purpose Python utility library. It aims to provide common helper functions and tools for various programming tasks. The current version is 0.8.12, released on June 20, 2022. Its release cadence appears irregular, based on PyPI upload history.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates basic usage of the `Digraph` utility for working with directed graphs.

from nr.util.digraph import Digraph

g = Digraph()
g.add_node('A')
g.add_node('B')
g.add_node('C')
g.add_edge('A', 'B')
g.add_edge('B', 'C')

print(f"Nodes: {g.nodes}")
print(f"Edges: {g.edges}")
print(f"Is DAG: {g.is_dag()}")

view raw JSON →