Skip to main content

Graph database with MVCC and NQL query language

Project description

NopalDB 🌵

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

Uploaded CPython 3.10+Windows x86-64

nopaldb-0.4.31-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB view details)

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

nopaldb-0.4.31-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.31-cp310-abi3-macosx_11_0_arm64.whl (3.8 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

nopaldb-0.4.31-cp310-abi3-macosx_10_12_x86_64.whl (4.3 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for nopaldb-0.4.31.tar.gz
Algorithm Hash digest
SHA256 ede38577fa62ff77926e888a482ce9bc86aee32007fd60e23b115c3de6c6567e
MD5 b830599f10bf2a3993d29a95876e16be
BLAKE2b-256 b7527d3f67674e6fd609f8d72a6b111320b2529d9b4f93ebae1acefc316c9e24

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: nopaldb-0.4.31-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.12

File hashes

Hashes for nopaldb-0.4.31-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0f574746df5946a165a468629bef96ccd9186ed39a78e7c5345c26ac0a458140
MD5 5a355bfc8712c6a47b71c9050d2cfca8
BLAKE2b-256 739b6c57581fd2d1fbc5814468abefd2c4ccf033b066ced945bc3cf504df5dd8

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nopaldb-0.4.31-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 fc7fb2c43645e70f29abeb076b018b44611a9c815cfd2276d9edee2d64f1a836
MD5 e9d4b6364297558281548ceed1c43765
BLAKE2b-256 b72712dced801ea8d2f235e6d1ed93f29d3eedc674bd82b5f86734888cb5ebce

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nopaldb-0.4.31-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 2146f903fd385e01a6a8b5b319285b3410b2c2b8df4440ef0e583697eb709edf
MD5 6f268c77318b465db7681edc1a8f50e3
BLAKE2b-256 56fb8a767940a81606295fb4d59ee772697cd88418509f75607dd500cf9d8a90

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nopaldb-0.4.31-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5b3abb6edfc3d1605d1cd162c7300e20187949a2de88903e75954d35b6c784b0
MD5 460ebced2d3d07069ee10f639d8ea3b8
BLAKE2b-256 909b35f0310de52776f070a4a30c5314e5d958f5a7cae63d98f396612716042b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nopaldb-0.4.31-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 137411303580d2eeafa5aadf2206a5409a969c28bd7b5e7f925031be65a096f1
MD5 d3a675cb22b6da7274fe20abfecf0225
BLAKE2b-256 aa0320c9094f46925798678947357e8c8e3f3f522d089bad09548f87f46e31bb

See more details on using hashes here.

Provenance

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