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.35.tar.gz (417.7 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.35-cp310-abi3-win_amd64.whl (4.1 MB view details)

Uploaded CPython 3.10+Windows x86-64

nopaldb-0.4.35-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.35-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.35-cp310-abi3-macosx_11_0_arm64.whl (3.9 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

nopaldb-0.4.35-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.35.tar.gz.

File metadata

  • Download URL: nopaldb-0.4.35.tar.gz
  • Upload date:
  • Size: 417.7 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.35.tar.gz
Algorithm Hash digest
SHA256 48871315d48df1aa924eee99b756ca8477acdbe10786b4797530e2ac8c605bd3
MD5 e0d211922249e42278e124140292d5d3
BLAKE2b-256 3fbb17077861eb90f18a4aaa8d7893fca7b02fff909618933afb809d8b024b04

See more details on using hashes here.

Provenance

The following attestation bundles were made for nopaldb-0.4.35.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.35-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: nopaldb-0.4.35-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.35-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 6115cdf075c6b9623ac65845753f0c9b79a20673d607d9672596c8ae1fc415f3
MD5 da07ae9e1793846108ff5df9d4838ff2
BLAKE2b-256 d061fa7f873d09be69629980cd293580b910aa9391137bf03d7802c60c6521db

See more details on using hashes here.

Provenance

The following attestation bundles were made for nopaldb-0.4.35-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.35-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nopaldb-0.4.35-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0eecd100645144853f12111ce6ff235443720756fd98f1a07484d696e939c2b2
MD5 7ad07f5f49836fd6e36b340679e506ea
BLAKE2b-256 6b2865fddd1541e19de5428a94aaf21c4ca5293c3a82e284f45c55f59a5ee1a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for nopaldb-0.4.35-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.35-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for nopaldb-0.4.35-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 502bb3ec2e535cf62b9bab98cfca9c0d0a67b61edb676d55d9ec8f97192d92c2
MD5 75cd6589e880b2f475941bb1e0d7a58b
BLAKE2b-256 43fc483b5eb6e4b5143220a6d2a1f82d3ac1c4a85655ead6cfd620ae62a3cd9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for nopaldb-0.4.35-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.35-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nopaldb-0.4.35-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cbce42e75427f2d14dad0cbbb98fdda36fac98aa7affeacbaabbff53343f5495
MD5 3dddf97e17cbb83f28568812cb94775b
BLAKE2b-256 504145a6546d5541e7dfc37e4af510a15031108ef59b3f836b42c4ad54ef48c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for nopaldb-0.4.35-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.35-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for nopaldb-0.4.35-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 8681832de17f3ece18237ad991c56d4dcdbae366caf69f34a2c3111415fedf44
MD5 76a5a967fbb290d29ca22e72960629b4
BLAKE2b-256 2b9a67aa61960e25a63ae524eb286818669440fa7c0fd66f0fb421f9399f2c72

See more details on using hashes here.

Provenance

The following attestation bundles were made for nopaldb-0.4.35-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