Skip to main content

aresadb

Python bindings for AresaDB — a high-performance multi-model database engine in Rust.

Key-Value · Graph · SQL · Vector Search · Full-Text Search — all from Python.

Install

pip install aresadb
# or
uv add aresadb

Quick Start

from aresadb_python import Database

db = Database.create("./mydata", "demo")

# Insert nodes
user = db.insert_dict("user", {"name": "Alice", "age": 30})

# Batch insert
nodes = db.insert_batch([
    ("user", {"name": "Bob", "age": 25}),
    ("user", {"name": "Charlie", "age": 35}),
])

# Get / Update / Delete
node = db.get(user.id)
updated = db.update(user.id, {"name": "Alice", "age": 31})
db.delete(user.id)

# List by type
users = db.get_by_type("user", limit=100)

SQL Queries

result = db.query("SELECT * FROM user WHERE age > 28 ORDER BY name LIMIT 10")
for row in result.rows:
    print(dict(zip(result.columns, row)))

db.query("INSERT INTO product (name, price) VALUES ('Widget', 9.99)")
db.query("UPDATE user SET age = 31 WHERE name = 'Alice'")
db.query("DELETE FROM user WHERE age < 18")

Graph (Edges & Traversal)

alice = db.insert_dict("user", {"name": "Alice"})
bob = db.insert_dict("user", {"name": "Bob"})
charlie = db.insert_dict("user", {"name": "Charlie"})

# Create edges (with optional properties)
edge = db.create_edge(alice.id, bob.id, "follows", {"since": "2024"})

# Batch edges
db.create_edges_batch([
    (bob.id, charlie.id, "follows"),
    (alice.id, charlie.id, "knows"),
])

# Query edges
outgoing = db.get_edges_from(alice.id)
incoming = db.get_edges_to(charlie.id, edge_type="follows")
db.delete_edge(edge.id)

# BFS traversal
result = db.traverse(alice.id, max_depth=3, edge_types=["follows"])
print(f"Visited {len(result.nodes)} nodes over {result.depth} hops")
print(result.adjacency)  # {node_id: [neighbor_ids]}

# Shortest path
path = db.shortest_path(alice.id, charlie.id)
if path:
    print(" -> ".join(n.properties.get("name", n.id) for n in path))

# Connected components
components = db.connected_components("user")
print(f"{len(components)} component(s)")

Secondary Indexes

db.create_index("user", "age")        # B-tree index
results = db.index_lookup("user", "age", 30)
db.list_indexes()                      # [("user", "age")]
db.drop_index("user", "age")

Full-Text Search (BM25)

db.insert("article", '{"title": "Rust", "body": "Rust is a systems language"}')
db.insert("article", '{"title": "Python", "body": "Python is great for ML"}')

db.create_fulltext_index("article", "body")

results = db.fulltext_search("article", "body", "Rust systems", limit=5)
for r in results:
    print(f"Score: {r.score:.3f}  Node: {r.node.properties}")

db.list_fulltext_indexes()  # [("article", "body")]

Vector Search (HNSW)

# Insert with embedding
doc = db.insert_with_embedding(
    "document",
    '{"title": "ML Intro"}',
    "embedding",
    [0.9, 0.1, 0.0, 0.0],
)

# k-NN search (HNSW-accelerated)
results = db.similarity_search(
    query_vector=[1.0, 0.0, 0.0, 0.0],
    node_type="document",
    field="embedding",
    k=10,
    metric="cosine",  # cosine | euclidean | dot | manhattan
)

# Radius search (exact, brute-force)
near = db.similarity_search_radius(
    [1.0, 0.0, 0.0, 0.0], "document", "embedding",
    max_distance=0.5, metric="euclidean",
)

# Retrieve node + embedding
node, vec = db.get_node_with_embedding(doc.id, "embedding")

# Rebuild HNSW index after bulk inserts
stats = db.rebuild_vector_index("document", "embedding")
print(f"{stats.num_vectors} vectors, dim={stats.dimension}")

Introspection

status = db.status()
print(f"{status.name}: {status.node_count} nodes, {status.edge_count} edges, {status.size_bytes} bytes")
print(db.name(), db.path())

Type Stubs

A .pyi stub file ships with the package for full IDE autocompletion and type checking.

Running Tests

cd python/
uv venv .venv && source .venv/bin/activate
uv pip install maturin pytest
maturin develop --release
pytest tests/ -v

License

MIT

Metadata

Release files for aresadb 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aresadb 0.2.0
File Size Uploaded Provenance
aresadb-0.2.0.tar.gz 242.9 kB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for aresadb 0.2.0
File
aresadb-0.2.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
aresadb-0.2.0-cp313-cp313-macosx_10_12_x86_64.whl CPython 3.13 CPython 3.13 macOS 10.12+ x86-64 Details
aresadb-0.2.0-cp312-cp312-manylinux_2_38_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.38+ x86-64 Details
aresadb-0.2.0-cp312-cp312-manylinux_2_38_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.38+ ARM64 Details
aresadb-0.2.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
aresadb-0.2.0-cp312-cp312-macosx_10_12_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.12+ x86-64 Details
aresadb-0.2.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
aresadb-0.2.0-cp311-cp311-macosx_10_12_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.12+ x86-64 Details
aresadb-0.2.0-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
aresadb-0.2.0-cp310-cp310-macosx_10_12_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.12+ x86-64 Details
aresadb-0.2.0-cp39-cp39-macosx_11_0_arm64.whl CPython 3.9 CPython 3.9 macOS 11.0+ ARM64 Details
aresadb-0.2.0-cp39-cp39-macosx_10_12_x86_64.whl CPython 3.9 CPython 3.9 macOS 10.12+ x86-64 Details

Total release size: 72.9 MB

Release files / aresadb-0.2.0.tar.gz

Download URL aresadb-0.2.0.tar.gz
Size 242.9 kB
Tags Source
SHA-256 checksum
How to use checksums
342e8bb05ea2086756696f619f4760b7c9f4f042064c26b039771ad292bd067b
BLAKE2b-256 checksum
How to use checksums
768d6809dec43f02a271d0d84dba0156c2a34bcf3822e7bf621716a8c356a5b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 15, 2026.

Transparency log

Release files / aresadb-0.2.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL aresadb-0.2.0-cp313-cp313-macosx_11_0_arm64.whl
Size 5.5 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
055e4823739952c242f2725e56edc3bde1b79d68fc5a7999fd9acf8a79e836b7
BLAKE2b-256 checksum
How to use checksums
0eae1941d0cb08d7633584fb77c31499a72883350790228f43b8f724bd24918e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 15, 2026.

Transparency log

Release files / aresadb-0.2.0-cp313-cp313-macosx_10_12_x86_64.whl

Download URL aresadb-0.2.0-cp313-cp313-macosx_10_12_x86_64.whl
Size 5.7 MB
Tags CPython 3.13 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
9db46fc292bcf989aecec2d9df96c64b1e7cce3db954c43e6863ee24fb811d1c
BLAKE2b-256 checksum
How to use checksums
6cfa2156042504850574820719532186296e7745c5b9a8c9ad0f794d778be97f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 15, 2026.

Transparency log

Release files / aresadb-0.2.0-cp312-cp312-manylinux_2_38_x86_64.whl

Download URL aresadb-0.2.0-cp312-cp312-manylinux_2_38_x86_64.whl
Size 8.4 MB
Tags CPython 3.12 Linux glibc 2.38+ x86-64
SHA-256 checksum
How to use checksums
ec647761f32e6c3d3dfb2f8e710eee47a8444b738557884e3ce82fb0ca708157
BLAKE2b-256 checksum
How to use checksums
96c21cb2dd3d1d1db02738335d1acfc026ec6d6df5f4396dcbeae7acb525941f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 15, 2026.

Transparency log

Release files / aresadb-0.2.0-cp312-cp312-manylinux_2_38_aarch64.whl

Download URL aresadb-0.2.0-cp312-cp312-manylinux_2_38_aarch64.whl
Size 8.2 MB
Tags CPython 3.12 Linux glibc 2.38+ ARM64
SHA-256 checksum
How to use checksums
f552f96a22d6fba8e212b536bb27e0e1e0b8304213299345f2e76813deeb81e5
BLAKE2b-256 checksum
How to use checksums
fe58dd85142884e048fcec135dc1052e80f38dcaef5d99d83868f85a9613c4d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 15, 2026.

Transparency log

Release files / aresadb-0.2.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL aresadb-0.2.0-cp312-cp312-macosx_11_0_arm64.whl
Size 5.5 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1f9b494bab69ae157156c56495192e32ff8514c1a78e147551406cf2f3d41fd5
BLAKE2b-256 checksum
How to use checksums
1b95d2f0e10075125830c4bde2b4cde0ca1b9689ca67e56484c905a72a4cb5c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 15, 2026.

Transparency log

Release files / aresadb-0.2.0-cp312-cp312-macosx_10_12_x86_64.whl

Download URL aresadb-0.2.0-cp312-cp312-macosx_10_12_x86_64.whl
Size 5.7 MB
Tags CPython 3.12 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
7fe748cefae8dde0bbb68408b0ef84013125eba7c9140cc92d77f8be5afb8063
BLAKE2b-256 checksum
How to use checksums
db86c9ca67147c38df54bcb72ce28be834311daa5592d138e912db8a94806ed1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 15, 2026.

Transparency log

Release files / aresadb-0.2.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL aresadb-0.2.0-cp311-cp311-macosx_11_0_arm64.whl
Size 5.5 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
48a20444a7e1086766545338d933e055546879cd22e8b0e4ba86590cbcd44e41
BLAKE2b-256 checksum
How to use checksums
ce7a8eeb681db7292b850803c80089df0cbe9e11a0143dc9db747251d900387c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 15, 2026.

Transparency log

Release files / aresadb-0.2.0-cp311-cp311-macosx_10_12_x86_64.whl

Download URL aresadb-0.2.0-cp311-cp311-macosx_10_12_x86_64.whl
Size 5.7 MB
Tags CPython 3.11 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
58d4810b087065430d4477d217a674f2fe44525aeb40cd9a35cdeb16acb5a955
BLAKE2b-256 checksum
How to use checksums
5496155509b008669bccb4c5c394fa8ac80f95959c45a1f547cade3b997475e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 15, 2026.

Transparency log

Release files / aresadb-0.2.0-cp310-cp310-macosx_11_0_arm64.whl

Download URL aresadb-0.2.0-cp310-cp310-macosx_11_0_arm64.whl
Size 5.5 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
fa8b37c38a3768ed3fd124201a7c4afb59828c4ae81dc161e0e59ded62a86fec
BLAKE2b-256 checksum
How to use checksums
55fea6b6a718c3fbf2f16c568f9c408e94d5bfd5043bddb805ea39ecafdc4628
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 15, 2026.

Transparency log

Release files / aresadb-0.2.0-cp310-cp310-macosx_10_12_x86_64.whl

Download URL aresadb-0.2.0-cp310-cp310-macosx_10_12_x86_64.whl
Size 5.7 MB
Tags CPython 3.10 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
4852393f3869172d291a17be744eb5ac4a8780956ae346d82251afc0fc53c8e6
BLAKE2b-256 checksum
How to use checksums
c4af62838a281ebbb042964b90e182999b5b83b7a10b46e9ce2f03b4560dab81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 15, 2026.

Transparency log

Release files / aresadb-0.2.0-cp39-cp39-macosx_11_0_arm64.whl

Download URL aresadb-0.2.0-cp39-cp39-macosx_11_0_arm64.whl
Size 5.5 MB
Tags CPython 3.9 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
814cf956c930951c3c1c6c76b1b0ba7190a1a90d1582b93a69e97245a349a817
BLAKE2b-256 checksum
How to use checksums
a039be3ce11bc8b833b01c83c07f2634c48086e650b2ee203547d6c1ef207181
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 15, 2026.

Transparency log

Release files / aresadb-0.2.0-cp39-cp39-macosx_10_12_x86_64.whl

Download URL aresadb-0.2.0-cp39-cp39-macosx_10_12_x86_64.whl
Size 5.7 MB
Tags CPython 3.9 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
6f8ccd15cb6b09342e967c157f59d820a6135067c0dc32ffe37c4c29c3796fe6
BLAKE2b-256 checksum
How to use checksums
33cb88d4ff5cea30f325ea0d0b2051a931a2f6155813de05089577933ee7a44f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 15, 2026.

Transparency log

Security for aresadb 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 13 files in this release have been uploaded with provenance metadata.

Select from 13 files

Attestation for aresadb-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page