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

Uploaded CPython 3.10+Windows x86-64

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

Uploaded CPython 3.10+macOS 11.0+ ARM64

nopaldb-0.4.34-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.34.tar.gz.

File metadata

  • Download URL: nopaldb-0.4.34.tar.gz
  • Upload date:
  • Size: 411.4 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.34.tar.gz
Algorithm Hash digest
SHA256 6440f1fe79275bf31aacabf5bc310e90bdb84d9675cc0efe7435d8ed81bc61a0
MD5 47ecf76f99c952e4f533bd83758577a4
BLAKE2b-256 6a346ddda8ddedee54826e9d12d741f197ee0986b92e4dab4d4b08aa03199eff

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: nopaldb-0.4.34-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.34-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 be7a6f5ea251616e1a343f1d409d09b14b1f1cf5b4f7fd36f6806f46ceb9fc02
MD5 8bbe8642f6ffd0541aef2a63c0873107
BLAKE2b-256 b168c34922de54169a7386474938cff44fbf51221ec2073559404f17141e9a72

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nopaldb-0.4.34-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3eac0144a715b5cc8a3551a4b24dacc6f45ddbee3d10a1b0f6ba755dee43fe8d
MD5 f201d981316ba3c7634875504c91cefd
BLAKE2b-256 bcc01952e7388af0c2a6864cd213abe14ac83532cdb42b50e4cb76b5954ea783

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nopaldb-0.4.34-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 49016c330f9922f68dd4e6386acca63f29d5c2911fb6a3e0824e5ca846274aa2
MD5 281f585832733b43826999c95030cf2f
BLAKE2b-256 0b5d6cbb5f575cde1355d878f6200102c13c2f32f912778ae890a18b56a6aa52

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nopaldb-0.4.34-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 0035cb650533effb879e944fa169c97d85d52409817a9585f7169f8099edf715
MD5 b1c55a66c79e47b17ccf1b5b6dd3058f
BLAKE2b-256 70630ddaa9a33525806320db2afa360bd04fe350f28cd1eaa9793dbf822e336c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nopaldb-0.4.34-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 979446d7ae07797e4c391e67a32f4f88ed24a52cdd9de59433d39d820a0b3210
MD5 4717ce9390adb5d5f9a15e715bd2fb87
BLAKE2b-256 0d84f77707c91fa04d27e959ebad9df15b162cc4959ca3260c4eb1138bcd3bad

See more details on using hashes here.

Provenance

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