Skip to main content

nx-ladybug

LadybugDB storage provider for nx-arrow columnar graphs. nx-arrow owns the Arrow-backed graph and the arrow NetworkX backend; this package only adds persistence into LadybugDB. Build and analyze graphs with nx-arrow everywhere — the only nxladybug import is the persist step.

Install

pip install nx-arrow nx-ladybug

For development:

pip install -e ".[test]"

Use

import networkx as nx
from nxladybug import LadybugStorageProvider, persist

g = nx.DiGraph([(0, 1), (1, 2)], backend="arrow")

nx.out_degree_centrality(g, backend="arrow")
list(nx.topological_sort(g, backend="arrow"))

Persist

persist() bulk-loads per-type frames through a storage provider — pick LadybugDB or Parquet:

from nxarrow.parquet import ParquetStorageProvider
from nxladybug import LadybugStorageProvider, persist

# LadybugDB: one unified node table (NxNode) + one relationship table
# (NxEdge) + a meta table (NxMeta). Each frame is registered as an Arrow
# staging table and bulk-copied natively — COPY <table> FROM (MATCH ...) —
# so endpoints resolve through the node primary key inside the copy.
provider = LadybugStorageProvider("graph.lbdb")  # or ":memory:"
persist(g, provider, graph_attrs=g.graph)
restored = provider.load_graph()  # full round-trip

# ... or Parquet: one file per type plus a manifest.json
parquet = ParquetStorageProvider("graph_store")
persist(g, parquet, graph_attrs=g.graph)
restored = parquet.load_graph()

The Ladybug provider drops and recreates its tables on every persist, so re-persisting a smaller graph leaves no stale rows. :memory: databases live as long as the provider; file paths reopen with LadybugStorageProvider.load(path).

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

Develop

pytest

Metadata

Release files for nx-ladybug 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-ladybug 0.1.0
File Size Uploaded Provenance Actions
nx_ladybug-0.1.0.tar.gz 10.6 kB Without provenance Details for nx_ladybug-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 20.0 kB

Release files / nx_ladybug-0.1.0.tar.gz

Download URL nx_ladybug-0.1.0.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
170e20f63475868ba85999fb9fbb0bc0ff04ef3d8260f73c1cb49defe365b97e
BLAKE2b-256 checksum
How to use checksums
e7adf515383fa537697afa93895af3ede8d909a976e0daadd47fbb537842d9ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

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

Download URL nx_ladybug-0.1.0-py3-none-any.whl
Size 9.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5aa14dfcba490a9a1178520546a348898e9d712abb42851dcb87ce806da9a0fd
BLAKE2b-256 checksum
How to use checksums
25303569450c76032f6062f7c4810f8c9658af905ae0d9805148a358effc2972
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.3

Security for nx-ladybug 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