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

Uploaded CPython 3.10+Windows x86-64

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

Uploaded CPython 3.10+macOS 11.0+ ARM64

nopaldb-0.4.33-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.33.tar.gz.

File metadata

  • Download URL: nopaldb-0.4.33.tar.gz
  • Upload date:
  • Size: 409.9 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.33.tar.gz
Algorithm Hash digest
SHA256 2edc5c081d75e8184767bd6d1df1649280b8de216475b2a2f6e3743f23fff0df
MD5 df7f30bdeda641e7d35602773a2e5777
BLAKE2b-256 e6c5b6162c66aeded4599a646204dc9cce56efc8bc0839f3bbc9139ee11e54bc

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: nopaldb-0.4.33-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.33-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 27eb46b7c350f444305afa8c681a0329750b34c88f9ada375fd9d1cac27a2ba6
MD5 1c8f3a2751b016ef429cb8ab017429ee
BLAKE2b-256 ef35a487728dc8758f9718bdc28d9ce5873e07a057326db938a22cde1671a932

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nopaldb-0.4.33-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 72b42059b954c678082791a2cf3a8cbbd25bf51aed6d796b7afb99493b960634
MD5 50586d64d8615ec0543a53b1f842cb1b
BLAKE2b-256 e759465bbeabae4a1fc5d83622e2b8eecf321edb0772ab02f6a815b3d0beca1f

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nopaldb-0.4.33-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 66eb61ea30e06b04ff9b3049186add22fc21e94a5ce7b9e879c1da07aa4f8d9c
MD5 d8779df7fd87fe2bc8c3e4751c2a82e8
BLAKE2b-256 f22dd1b84d6418b1b75b29f0b640045a483882ae0029d4acdfce6a98ecab9113

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nopaldb-0.4.33-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a5ec7e5964dfcd19005b0ec77d33491c3ce9f05ce4f5c3c68b8c24be375c58f8
MD5 76287142fcff21563965c249566cb634
BLAKE2b-256 fdd9c3ebc8f347a588cb2720b658ea354c060fa1413d5c2e999e98d49bf7c629

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nopaldb-0.4.33-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1fe667a456c35ee6c16668175991b8b33f641a1ed5450d1148de34b48a7d1c44
MD5 efd3ad66e825a541b0aeafaa73f2cd83
BLAKE2b-256 310fa285dd995cb50e3e015ca9f99a694925fa598045206836a126a6ffd40498

See more details on using hashes here.

Provenance

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