Skip to main content

nx-arrow

Columnar graph storage for NetworkX backed by Apache Arrow. Graphs live in pyarrow.Tables (tight, typed columns instead of per-object Python dicts) while staying usable through the standard NetworkX dispatchable API.

Derived from prototyping in the NetworkX repository; NetworkX itself is a regular dependency here, not a fork.

Install

pip install nx-arrow

For development:

pip install -e ".[test]"

Use

import networkx as nx

# build an arrow-backed graph through the standard constructor
G = nx.DiGraph([(0, 1), (1, 2)], backend="arrow")

# run natively on Arrow tables ...
nx.out_degree_centrality(G, backend="arrow")
list(nx.topological_sort(G, backend="arrow"))

# ... or let dispatch pick the backend automatically
# NETWORKX_BACKEND_PRIORITY=arrow python script.py

# heterogeneous node/edge types are first-class columns
G.add_node("alice", node_type="user", age=30)
G.add_edge("alice", 0, edge_type="rates")
G.nodes_of_type("user")
G.edges_of_type("rates")

Single-edge incremental writes stay dict-backed territory; convert with ArrowDiGraph.from_networkx / to_networkx, or set NETWORKX_FALLBACK_TO_NX=True and let dispatch convert back.

Persist

Storage providers bulk-load per-type frames into an external store:

from nxarrow import ParquetStorageProvider, persist

provider = ParquetStorageProvider("graph_store")
persist(G, provider, graph_attrs=G.graph)
restored = provider.load_graph()  # full round-trip

Custom stores implement store_nodes(frames) / store_edges(frames) and register with nxarrow.register_storage_provider.

Develop

pytest
python benchmarks/bench_memory.py --n 20000

See benchmarks/results.md for memory/throughput numbers.

Metadata

Release files for nx-arrow 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nx-arrow 0.1.0
File Size Uploaded Provenance
nx_arrow-0.1.0.tar.gz 18.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for nx-arrow 0.1.0
File Interpreter ABI Platform
nx_arrow-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 34.4 kB

Release files / nx_arrow-0.1.0.tar.gz

Download URL nx_arrow-0.1.0.tar.gz
Size 18.1 kB
Tags Source
SHA-256 checksum
How to use checksums
27650c25233c7789e0eea24c693f66d4adfba73d6c36bb380dd7cbe7b1a3c08d
BLAKE2b-256 checksum
How to use checksums
4b5acca84b067714893a073f30d1145f8bcc13bbbaed74eebc6592c567656a5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Release files / nx_arrow-0.1.0-py3-none-any.whl

Download URL nx_arrow-0.1.0-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2605bb4b52bd70537aa3df4011d76ef3f0ccb4d9c0a6760dd5cfc35ec14ba154
BLAKE2b-256 checksum
How to use checksums
df4f6271bedb9717a0021c12d594d62144de345a2db711dab6ecfab3c0ec42dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Security for nx-arrow 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page