Graph

Create and manipulate Zig-backed graphs through Python bindings and GraphView.create().

3.6k|225|Updated Dec 19, 2023
One-click install
npx skills add https://github.com/atopile/atopile --skill graph
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Graph
Source: https://github.com/atopile/atopile/tree/main/.claude/skills/graph
Command: npx skills add https://github.com/atopile/atopile --skill graph

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

The Graph module provides a Python-friendly wrapper around a Zig-backed graph implementation, exposing a safe API to create and manipulate graph structures from Python while relying on Zig for core performance.

Core Features & Use Cases

  • GraphView: high-level view over nodes and edges with per-view storage and invariants.
  • NodeReference / EdgeReference: lightweight handles into the Zig backing for efficient traversal and operations.
  • API Surface: Python bindings for creating graphs, inserting nodes and edges, and ensuring proper cleanup.

Quick Start

Use GraphView.create() to start a new graph, then insert nodes and edges via the provided API.

Frequently Asked Questions about Graph

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create and manipulate a graph in Python using a Zig backend?

To create a graph in Python with a Zig backend, call GraphView.create() to initialize the structure, then use Python bindings to insert nodes and edges via NodeReference and EdgeReference handles for safe manipulation.

What is the benefit of using Zig-backed graph structures in Python?

Zig-backed graph structures provide Python developers with a safe API for efficient core performance during graph traversal and manipulation, while ensuring strict ownership semantics and proper cleanup through generated stubs.

How do NodeReference and EdgeReference work when traversing graphs in Python?

NodeReference and EdgeReference act as lightweight handles into the Zig backing store, enabling efficient graph traversal and operations within a GraphView that maintains per-view storage and invariants.

Can I use this Zig-Python binding to manage graph memory and cleanup automatically?

Yes, the Zig-Python bindings expose a safe API that ensures proper cleanup of graph structures, enforcing strict ownership semantics while allowing Python to manage the lifecycle of GraphView instances.

Does this graph API support per-view storage for tooling applications?

Yes, the graph API supports per-view storage through the GraphView component, which maintains specific invariants and allows developers to build graph-based tooling with isolated views over nodes and edges.