Registry / devops / objectgraph

objectgraph

JSON →
library1.0.5pypypi✓ verified 79d ago

A basic graph library for Python, providing simple graph data structures and algorithms. Current version 1.0.5, released in 2023. Active development.

pip install objectgraph
INSTALL
IMPORT
SIG · OBJECTGRAPH
O
objectgraph
devopspythonv1.0.5
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ObjectGraph
from objectgraph import ObjectGraph
from objectgraph import Graph
EDGE_TYPE
from objectgraph import EDGE_TYPE
NODE_TYPE
from objectgraph import NODE_TYPE

Create a simple directed graph, add nodes, and display adjacency list.

from objectgraph import Graph, Node # Create a graph g = Graph() # Add nodes node_a = Node('A') node_b = Node('B') g.add_node(node_a) g.add_node(node_b) # Add edge g.add_edge(node_a, node_b) print(g.adjacency()) # Output: {'A': ['B'], 'B': []}
Debug
Known issues
breakingIn v1.0, the import paths changed from submodule to top-level. Code using 'from objectgraph.graph import Graph' will fail.
fix
Use 'from objectgraph import Graph' instead.
affects: >=1.0.0
breakingThe 'adjacency' method now returns a dict with keys as node labels, not Node objects. This change from v0.x might break code expecting Node objects.
fix
Access adjacency by node label string instead of Node instance.
affects: >=1.0.0
deprecatedThe 'add_edge' method previously accepted node objects directly; now it requires Node objects (not strings). Strings may raise TypeError in future.
fix
Always pass Node objects to add_edge.
affects: >=1.0.0
gotchaGraph does not support parallel edges or self-loops. Adding duplicate edges is silently ignored.
fix
Use a multigraph library like NetworkX if parallel edges are needed.
affects: *
Upgrade
Version history
1.0.5latest on PyPI · released Nov 21, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
2 hits · last 30 days
node
2
Resources
objectgraph — pip install objectgraph · libregistry