Skip to main content

AletheiaDB Python SDK

Native Python bindings for AletheiaDB — a high-performance bi-temporal graph database built in Rust, designed for LLM integration. Track both valid time (when facts were true in reality) and transaction time (when they were recorded), with first-class vector search and Cypher queries.

Install

pip install aletheiadatabase

Note: the PyPI distribution is named aletheiadatabase, but the import name is aletheiadb. Install the former, import the latter. The unrelated aletheiadb package on PyPI is not this project.

import aletheiadb  # correct after `pip install aletheiadatabase`

Pre-built wheels are published for Linux (x86_64, aarch64), macOS (x86_64, arm64), and Windows (x86_64) on Python 3.9 – 3.13. No Rust toolchain required.

Quickstart

from aletheiadb import AletheiaDB

db = AletheiaDB()

alice = db.create_node("Person", {"name": "Alice", "age": 30})
bob   = db.create_node("Person", {"name": "Bob"})
db.create_edge(alice, bob, "KNOWS", {"since": 2024})

# Read current state
node = db.get_node(alice)
print(node.label, node.properties)        # Person {'name': 'Alice', 'age': 30}

# Update properties (creates a new bi-temporal version under the hood)
db.update_node(alice, {"name": "Alice", "age": 31})

# Time-travel: get a node as it existed at a specific point in time
historical = db.get_node_at_time(alice, valid_time="2026-01-01T00:00:00Z")

# Inspect the full version history
for v in db.node_history(alice):
    print(v["version_number"], v["properties"])

Graph traversal

# Single-hop adjacency
db.outgoing_edges(alice, label="KNOWS")    # [edge_id, ...]
db.incoming_edges(bob)

# Multi-hop BFS
db.traverse(start=alice, label="KNOWS", max_depth=3, direction="out")
from aletheiadb import HnswConfig, DistanceMetric, enable_vector_index, find_similar

enable_vector_index(db, "embedding", HnswConfig(384, DistanceMetric.COSINE))

# Embeddings come in as plain Python lists
doc1 = db.create_node("Document", {"title": "Rust", "embedding": [0.1] * 384})
doc2 = db.create_node("Document", {"title": "Python", "embedding": [0.2] * 384})

results = find_similar(db, query_node_id=doc1, k=10, label="Document")
# -> [(node_id, score), ...] sorted by similarity desc

Cypher queries

rows = db.execute_cypher(
    "MATCH (n:Person {name: $name})-[:KNOWS]->(friend) RETURN friend",
    params={"name": "Alice"},
)
for row in rows:
    print(row["kind"], row["entity"])

API

Area Functions
Lifecycle AletheiaDB(), AletheiaDB.open(config_path)
Nodes create_node, get_node, update_node, delete_node, delete_node_cascade, count_nodes, list_nodes, nodes_by_label
Edges create_edge, get_edge, update_edge, delete_edge, count_edges
Adjacency outgoing_edges, incoming_edges, out_degree, in_degree, traverse
Temporal get_node_at_time, get_edge_at_time, node_history
Vector enable_vector_index, find_similar, find_similar_by_vector
Query execute_cypher, execute_aql

Timestamps accept datetime, ISO-8601 strings, integer microseconds since the Unix epoch, or None (which means now).

License

MIT OR Apache-2.0

Metadata

Release files for aletheiadatabase 0.1.3

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

Source distribution (sdist)

Source distribution for aletheiadatabase 0.1.3
File Size Uploaded Provenance Actions
aletheiadatabase-0.1.3.tar.gz 6.0 MB With provenance Details for aletheiadatabase-0.1.3.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for aletheiadatabase 0.1.3
File Actions
aletheiadatabase-0.1.3-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for aletheiadatabase-0.1.3-cp39-abi3-win_amd64.whl
aletheiadatabase-0.1.3-cp39-abi3-manylinux_2_28_x86_64.whl CPython 3.9 abi3 Linux glibc 2.28+ x86-64 Details for aletheiadatabase-0.1.3-cp39-abi3-manylinux_2_28_x86_64.whl
aletheiadatabase-0.1.3-cp39-abi3-manylinux_2_28_aarch64.whl CPython 3.9 abi3 Linux glibc 2.28+ ARM64 Details for aletheiadatabase-0.1.3-cp39-abi3-manylinux_2_28_aarch64.whl
aletheiadatabase-0.1.3-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for aletheiadatabase-0.1.3-cp39-abi3-macosx_11_0_arm64.whl
aletheiadatabase-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for aletheiadatabase-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 25.5 MB

Release files / aletheiadatabase-0.1.3.tar.gz

Download URL aletheiadatabase-0.1.3.tar.gz
Size 6.0 MB
Tags Source
SHA-256 checksum
How to use checksums
5342ea316983c91ac45f55ffe7b64af55ac2de93ca22df62cd863ec8cff187a0
BLAKE2b-256 checksum
How to use checksums
0bb9526a3177f69f1534cd89d0a96a1c8ebbeeaa32e26b2e10d867abaf467413
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / aletheiadatabase-0.1.3-cp39-abi3-win_amd64.whl

Download URL aletheiadatabase-0.1.3-cp39-abi3-win_amd64.whl
Size 4.0 MB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
c15416fad1ca3382c229a5351165ab97542d10188b1672af82798f033bb28a8f
BLAKE2b-256 checksum
How to use checksums
c9cfc32fa78745d05612f8e299eff7829cb76372c0b51b07e8199f0b57495c53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / aletheiadatabase-0.1.3-cp39-abi3-manylinux_2_28_x86_64.whl

Download URL aletheiadatabase-0.1.3-cp39-abi3-manylinux_2_28_x86_64.whl
Size 4.9 MB
Tags CPython 3.9 Linux glibc 2.28+ x86-64 abi3
SHA-256 checksum
How to use checksums
696e5f879b239ccbcd4687e99efd4989458d0232883b4e9a7f5affb47295c434
BLAKE2b-256 checksum
How to use checksums
4264aef67cf4591d402687e73528693c574e0611c04e7baf22dfd0b328e208e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / aletheiadatabase-0.1.3-cp39-abi3-manylinux_2_28_aarch64.whl

Download URL aletheiadatabase-0.1.3-cp39-abi3-manylinux_2_28_aarch64.whl
Size 4.0 MB
Tags CPython 3.9 Linux glibc 2.28+ ARM64 abi3
SHA-256 checksum
How to use checksums
fa3f9b724e9d9f73b2371349f8e1aa5399f9e1533f2d5dab4c0d8499d03b87a0
BLAKE2b-256 checksum
How to use checksums
fd5d83ade23ceeabd35c272acff2a96590628d6bd1843c6eeea34fa174968467
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / aletheiadatabase-0.1.3-cp39-abi3-macosx_11_0_arm64.whl

Download URL aletheiadatabase-0.1.3-cp39-abi3-macosx_11_0_arm64.whl
Size 3.1 MB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
adf799993680c95da149c08ef7d8f1f4cadb4205ec2dbdb3c7c669bd4fc52433
BLAKE2b-256 checksum
How to use checksums
8d2ac22ce9bc5c52175cd982316cc89af07ef2fb9884cbe3b7773278dae29c32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Release files / aletheiadatabase-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl

Download URL aletheiadatabase-0.1.3-cp39-abi3-macosx_10_12_x86_64.whl
Size 3.4 MB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
3579130014edc77e0f36530f84873e89609e24cfd529edca5e4baf65f1546c33
BLAKE2b-256 checksum
How to use checksums
0c00f7546a3673067b5dcd569dd31f2ce933737b04749277a505e4bddbe50848
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Jul 30, 2026.

Transparency log

Security for aletheiadatabase 0.1.3

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 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for aletheiadatabase-0.1.3.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 Jul 30, 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.3 This release

6 release files Full provenance

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