skillfed

objectgraph

A basic graph library

objectgraph v1.0.5 129.4K downloads/30d#11,670 on PyPI6
Permissive license MIT AGING released

What it is and what it does

Objectgraph is a graph library for Python 3 that lets you represent directed graphs where nodes are arbitrary objects (identified by a hashable 'identifier' attribute) and edges can carry arbitrary attributes. The library uses a non-standard edge model: multiple edges between the same pair of nodes are allowed, but edges with identical attributes are automatically collapsed into a single edge, reducing redundancy.

The package is a complete rewrite of the ObjectGraph class from altgraph, built from scratch for Python 3 with full test coverage. It depends only on typing_extensions and supports Python 3.10 through 3.15, including free-threading support in Python 3. The codebase is marked Production/Stable and has been actively maintained since its initial release in 2019, though recent activity has slowed.

Use it for:

  • Build dependency graphs or call graphs where you need to track relationships between arbitrary Python objects.
  • Model network topologies or system architectures where nodes represent entities and edges represent connections with metadata.
  • Analyze object relationships in memory profiling or debugging tools that need to represent object references.
  • Implement graph-based algorithms on custom domain objects without writing graph infrastructure from scratch.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Objectgraph provides a Python class for representing directed graphs with arbitrary objects as nodes and multi-edge support, where edges with identical attributes collapse into a single edge.

Yes, if you need a lightweight, permissively licensed graph library for Python 3.10+. The single dependency, Production/Stable status, and zero known vulnerabilities make it low-risk. The aging maintenance status (no release in 266 days) is a minor concern for a stable library but worth monitoring if you plan long-term use. Suitable for small to medium graph use cases; verify performance characteristics for larger workloads.

Install

objectgraph on PyPI

pip

pip install objectgraph

uv

uv add objectgraph

poetry

poetry add objectgraph

Installing objectgraph

Before you install

Low install friction; single lightweight dependency on typing_extensions. Maintenance status is aging—last commit was 2026-01-02 and no release in 266 days—but the codebase is marked Production/Stable and supports current Python versions through 3.15.

License in practice

MIT license (permissive) places no restrictions on use, modification, or distribution in commercial or private projects.

Quickstart

pip install objectgraph

from objectgraph import ObjectGraph

graph = ObjectGraph()
# Add nodes and edges via the graph API

Requires Python 3.10 or later.

Verify before relying

  • Whether the graph implementation is optimized for large-scale use or primarily suited to small to medium graphs.
  • Performance characteristics compared to other graph libraries or whether benchmarks exist.
  • Whether the 'identifier' attribute requirement for nodes imposes practical constraints on object types.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — typing_extensions
Maintenance aging — 266 days since the last release
Last repo commit
First released
Downloads 129,438/month — #11,670 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: objectgraph-1.0.5-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Free Threading :: 3 - StableProgramming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: Libraries :: Python Modules

Tags

graph library pythondirected graph nodes edgesobject graph data structuregraph representation librarynetwork graph pythongraph with arbitrary objectsmulti-edge graph support
graph-algorithmsdata-structures

More Python Modules packages