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
- Repository & docs: https://github.com/sharop/nopaldb
- Adoption guide: https://github.com/sharop/nopaldb/blob/main/docs/ADOPTION.md
- NQL reference: https://github.com/sharop/nopaldb/blob/main/docs/en/NQL_REFERENCE.md
- Rust crate: https://crates.io/crates/nopaldb
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
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48871315d48df1aa924eee99b756ca8477acdbe10786b4797530e2ac8c605bd3
|
|
| MD5 |
e0d211922249e42278e124140292d5d3
|
|
| BLAKE2b-256 |
3fbb17077861eb90f18a4aaa8d7893fca7b02fff909618933afb809d8b024b04
|
Provenance
The following attestation bundles were made for nopaldb-0.4.35.tar.gz:
Publisher:
release-python.yml on sharop/nopaldb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nopaldb-0.4.35.tar.gz -
Subject digest:
48871315d48df1aa924eee99b756ca8477acdbe10786b4797530e2ac8c605bd3 - Sigstore transparency entry: 2266691484
- Sigstore integration time:
-
Permalink:
sharop/nopaldb@0ff8e1ae592c21324146bae21dffbb8284c873f1 -
Branch / Tag:
refs/tags/v0.4.35 - Owner: https://github.com/sharop
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@0ff8e1ae592c21324146bae21dffbb8284c873f1 -
Trigger Event:
push
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6115cdf075c6b9623ac65845753f0c9b79a20673d607d9672596c8ae1fc415f3
|
|
| MD5 |
da07ae9e1793846108ff5df9d4838ff2
|
|
| BLAKE2b-256 |
d061fa7f873d09be69629980cd293580b910aa9391137bf03d7802c60c6521db
|
Provenance
The following attestation bundles were made for nopaldb-0.4.35-cp310-abi3-win_amd64.whl:
Publisher:
release-python.yml on sharop/nopaldb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nopaldb-0.4.35-cp310-abi3-win_amd64.whl -
Subject digest:
6115cdf075c6b9623ac65845753f0c9b79a20673d607d9672596c8ae1fc415f3 - Sigstore transparency entry: 2266692435
- Sigstore integration time:
-
Permalink:
sharop/nopaldb@0ff8e1ae592c21324146bae21dffbb8284c873f1 -
Branch / Tag:
refs/tags/v0.4.35 - Owner: https://github.com/sharop
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@0ff8e1ae592c21324146bae21dffbb8284c873f1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nopaldb-0.4.35-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: nopaldb-0.4.35-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 4.7 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0eecd100645144853f12111ce6ff235443720756fd98f1a07484d696e939c2b2
|
|
| MD5 |
7ad07f5f49836fd6e36b340679e506ea
|
|
| BLAKE2b-256 |
6b2865fddd1541e19de5428a94aaf21c4ca5293c3a82e284f45c55f59a5ee1a7
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nopaldb-0.4.35-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl -
Subject digest:
0eecd100645144853f12111ce6ff235443720756fd98f1a07484d696e939c2b2 - Sigstore transparency entry: 2266692124
- Sigstore integration time:
-
Permalink:
sharop/nopaldb@0ff8e1ae592c21324146bae21dffbb8284c873f1 -
Branch / Tag:
refs/tags/v0.4.35 - Owner: https://github.com/sharop
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@0ff8e1ae592c21324146bae21dffbb8284c873f1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nopaldb-0.4.35-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.
File metadata
- Download URL: nopaldb-0.4.35-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
- Upload date:
- Size: 4.3 MB
- Tags: CPython 3.10+, manylinux: glibc 2.17+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
502bb3ec2e535cf62b9bab98cfca9c0d0a67b61edb676d55d9ec8f97192d92c2
|
|
| MD5 |
75cd6589e880b2f475941bb1e0d7a58b
|
|
| BLAKE2b-256 |
43fc483b5eb6e4b5143220a6d2a1f82d3ac1c4a85655ead6cfd620ae62a3cd9f
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nopaldb-0.4.35-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl -
Subject digest:
502bb3ec2e535cf62b9bab98cfca9c0d0a67b61edb676d55d9ec8f97192d92c2 - Sigstore transparency entry: 2266691863
- Sigstore integration time:
-
Permalink:
sharop/nopaldb@0ff8e1ae592c21324146bae21dffbb8284c873f1 -
Branch / Tag:
refs/tags/v0.4.35 - Owner: https://github.com/sharop
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@0ff8e1ae592c21324146bae21dffbb8284c873f1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nopaldb-0.4.35-cp310-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: nopaldb-0.4.35-cp310-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.9 MB
- Tags: CPython 3.10+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbce42e75427f2d14dad0cbbb98fdda36fac98aa7affeacbaabbff53343f5495
|
|
| MD5 |
3dddf97e17cbb83f28568812cb94775b
|
|
| BLAKE2b-256 |
504145a6546d5541e7dfc37e4af510a15031108ef59b3f836b42c4ad54ef48c3
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nopaldb-0.4.35-cp310-abi3-macosx_11_0_arm64.whl -
Subject digest:
cbce42e75427f2d14dad0cbbb98fdda36fac98aa7affeacbaabbff53343f5495 - Sigstore transparency entry: 2266693055
- Sigstore integration time:
-
Permalink:
sharop/nopaldb@0ff8e1ae592c21324146bae21dffbb8284c873f1 -
Branch / Tag:
refs/tags/v0.4.35 - Owner: https://github.com/sharop
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@0ff8e1ae592c21324146bae21dffbb8284c873f1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nopaldb-0.4.35-cp310-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: nopaldb-0.4.35-cp310-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 4.4 MB
- Tags: CPython 3.10+, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8681832de17f3ece18237ad991c56d4dcdbae366caf69f34a2c3111415fedf44
|
|
| MD5 |
76a5a967fbb290d29ca22e72960629b4
|
|
| BLAKE2b-256 |
2b9a67aa61960e25a63ae524eb286818669440fa7c0fd66f0fb421f9399f2c72
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nopaldb-0.4.35-cp310-abi3-macosx_10_12_x86_64.whl -
Subject digest:
8681832de17f3ece18237ad991c56d4dcdbae366caf69f34a2c3111415fedf44 - Sigstore transparency entry: 2266692721
- Sigstore integration time:
-
Permalink:
sharop/nopaldb@0ff8e1ae592c21324146bae21dffbb8284c873f1 -
Branch / Tag:
refs/tags/v0.4.35 - Owner: https://github.com/sharop
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-python.yml@0ff8e1ae592c21324146bae21dffbb8284c873f1 -
Trigger Event:
push
-
Statement type: