Skip to main content

Graph database with MVCC and NQL query language

Project description

NopalDB logo

NopalDB 🌵

PyPI Python PyPI downloads CI License

High-performance embedded graph database for Python, written in Rust: ACID transactions, MVCC time-travel, a Cypher-like query language (NQL), vector search, and zero-copy Apache Arrow export for ML pipelines.

Runs in-process — no server to deploy. One pip install, one file on disk.

Install

pip install nopaldb

Prebuilt wheels for Linux (x86_64/aarch64), macOS (Intel/Apple Silicon) and Windows, for CPython 3.10+ (abi3: one wheel per platform covers all versions).

Quickstart

import nopaldb

graph = nopaldb.Graph.open("./data.db")

# ACID transactions
tx = graph.begin_transaction()
alice = tx.add_node("Person", {"name": "Alice", "age": 30})
bob = tx.add_node("Person", {"name": "Bob", "age": 25})
tx.add_edge(alice, bob, "KNOWS")
tx.commit()

# Query with NQL
result = graph.execute_nql("""
    find p.name, p.age
    from (p:Person)
    where p.age > 25
""")
for row in result:
    print(f"{row['p.name']}: {row['p.age']}")

graph.close()

Isolation levels

tx = graph.begin_transaction(isolation="serializable")
# read_committed (default) | repeatable_read | serializable | read_uncommitted

Serializable transactions detect write conflicts and deadlocks; see the durability guarantees and isolation guide.

Arrow / ML pipelines

import pyarrow as pa

arrow_bytes = graph.to_arrow(label="Person")
batch = pa.ipc.open_stream(arrow_bytes).read_next_batch()
df = batch.to_pandas()   # zero-copy into Pandas / Polars / PyTorch pipelines

Good to know

  • One process per data directory (embedded file lock). Threads within the process run in parallel — the bindings release the GIL during database calls.
  • Use graph.bulk_loader(batch_size) for large ingestions.
  • Time-travel: MVCC version history is queryable; old versions are garbage collected on demand.

Links

License: MPL-2.0 (the nopaldb library). The companion nopaldb-mcp server and ndbstudio TUI are AGPL-3.0-only. Releases ≤ 0.4.31 were AGPL-3.0-only. NopalDB™ is a trademark of Sergio Haro Pérez.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nopaldb-0.4.32.tar.gz (400.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

nopaldb-0.4.32-cp310-abi3-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.10+Windows x86-64

nopaldb-0.4.32-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.7 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

nopaldb-0.4.32-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.3 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

nopaldb-0.4.32-cp310-abi3-macosx_11_0_arm64.whl (3.9 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

nopaldb-0.4.32-cp310-abi3-macosx_10_12_x86_64.whl (4.4 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file nopaldb-0.4.32.tar.gz.

File metadata

  • Download URL: nopaldb-0.4.32.tar.gz
  • Upload date:
  • Size: 400.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for nopaldb-0.4.32.tar.gz
Algorithm Hash digest
SHA256 7a238af9acf06f52d7a94c80242b713a5f2afe9dfbe278eb6fb48c2ec9421838
MD5 6692202118949cfaaa1333c3563214a7
BLAKE2b-256 7904c8927a6610f811b8f677e11fbed68d77f35a32656c0af9c096f2d24147f8

See more details on using hashes here.

Provenance

The following attestation bundles were made for nopaldb-0.4.32.tar.gz:

Publisher: release-python.yml on sharop/nopaldb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nopaldb-0.4.32-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: nopaldb-0.4.32-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 4.1 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for nopaldb-0.4.32-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d81af3c9f4684770f8e8aefb8403ba7fe18f868edbf57413a94e408f07f9e0fa
MD5 359733a3722269c9ac76a0ef2d736892
BLAKE2b-256 806386a15d1e53db1bbef493a95e0fa29bb26233a1d8d2f38d94f4a7f1d1505a

See more details on using hashes here.

Provenance

The following attestation bundles were made for nopaldb-0.4.32-cp310-abi3-win_amd64.whl:

Publisher: release-python.yml on sharop/nopaldb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nopaldb-0.4.32-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nopaldb-0.4.32-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ea58bb4b1a0ab0e9d4a299fd1b911d626bc1f9b9257cc6bfbe363ccb768888ff
MD5 0784dc4a75463944b9ef18f4791a9f63
BLAKE2b-256 daf78bec00bf558a18f1df137e53416cfbfc28d19667d71d90a31a2f55ac938e

See more details on using hashes here.

Provenance

The following attestation bundles were made for nopaldb-0.4.32-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release-python.yml on sharop/nopaldb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nopaldb-0.4.32-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nopaldb-0.4.32-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 8d3c2f8db08a6d481921d74fd5a1f1b0492337d5255347dfcaaca0c01f67cc15
MD5 aaf8fe1a4e7d76126503d23d50bc8eff
BLAKE2b-256 2225214dfdddcf7861c7007c8a1eebc63c17143634749cd372c5ec726a1fea0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for nopaldb-0.4.32-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release-python.yml on sharop/nopaldb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nopaldb-0.4.32-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nopaldb-0.4.32-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 77647721e2898af8d84bef1d5ded9ad00c21faf93ad9c649eaead23e66cd5ea5
MD5 ad93f3317bd3e0808a37c59504ccb709
BLAKE2b-256 12c014c5919377c3be1724044f5736edb3e3666ac1d7a5dfca74e14c9aa86fec

See more details on using hashes here.

Provenance

The following attestation bundles were made for nopaldb-0.4.32-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: release-python.yml on sharop/nopaldb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nopaldb-0.4.32-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for nopaldb-0.4.32-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ad230c3bb1c810c1045ff4ab5f94c521c2855eb6759185367301063f1f46aec6
MD5 5664226e848d249d29deb458eb97f8a1
BLAKE2b-256 ca46bfa64d6f236f294b37060daa55840bba0c1fd4b835fa77031adff27e457c

See more details on using hashes here.

Provenance

The following attestation bundles were made for nopaldb-0.4.32-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: release-python.yml on sharop/nopaldb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page