astraeadb
Python client for AstraeaDB, a graph database with vector search written in Rust. Talks to the AstraeaDB server over newline-delimited JSON-over-TCP (no dependencies) with an optional Apache Arrow Flight transport and pandas integration.
Installation
pip install astraeadb # core client, zero dependencies
pip install "astraeadb[arrow]" # + Arrow Flight transport (pyarrow)
pip install "astraeadb[pandas]" # + DataFrame helpers (pandas)
pip install "astraeadb[all]" # everything
Requires Python 3.9+. A running AstraeaDB server is required — see the AstraeaDB documentation.
Quick start
from astraeadb import AstraeaClient
with AstraeaClient(host="127.0.0.1", port=7687) as client:
alice = client.create_node(["Person"], {"name": "Alice", "age": 30})
bob = client.create_node(["Person"], {"name": "Bob"})
client.create_edge(alice, bob, "KNOWS", weight=0.9)
# Traversals
client.bfs(alice, max_depth=2)
client.dfs(alice, max_depth=2)
client.shortest_path(alice, bob, weighted=True)
# Lookups
client.find_by_label("Person")
client.find_edge_by_type("KNOWS")
# Vector similarity (results carry node_id + distance; smaller is closer)
hits = client.vector_search([0.1, 0.9, 0.3], k=5)
# Graph algorithms (computed server-side)
client.run_pagerank()
client.run_louvain()
client.run_betweenness_centrality()
# GQL
client.query("MATCH (p:Person) RETURN p.name")
Features
- CRUD — create/read/update/delete nodes and edges with arbitrary properties
- Lookups —
find_by_label,find_edge_by_type, bulkdelete_by_label - Traversals —
bfs,dfs,shortest_path,neighbors - Temporal queries — time-travel variants (
bfs_at,dfs_at,neighbors_at,shortest_path_at) over edge validity windows - Graph algorithms —
run_pagerank,run_louvain,run_connected_components,run_degree_centrality,run_betweenness_centrality - Vector search —
vector_search(k-NN),hybrid_search(graph + vector),semantic_neighbors,semantic_walk - GraphRAG —
extract_subgraphandgraph_ragfor LLM context assembly - Statistics —
graph_statsand rawget_subgraphexport - GQL —
queryfor Cypher-style graph queries - Batch —
create_nodes,create_edges,delete_nodes,delete_edges - DataFrames — import/export helpers in
astraeadb.dataframe(pandas) - Arrow Flight — high-throughput columnar transport when
pyarrowis installed
Clients
| Class | Transport | Notes |
|---|---|---|
JsonClient |
JSON/TCP | Always available, zero dependencies |
ArrowClient |
Arrow Flight | Requires pyarrow; high-throughput bulk/query |
AstraeaClient |
Auto-select | Uses Arrow when available, falls back to JSON |
from astraeadb import JsonClient # explicit JSON/TCP
from astraeadb import ArrowClient # explicit Arrow Flight (needs pyarrow)
from astraeadb import AstraeaClient # unified, auto-selecting
License
MIT © 2026 James Harris.
Release files for astraeadb 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| astraeadb-0.1.1.tar.gz | 15.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| astraeadb-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.9 kB
Release files / astraeadb-0.1.1.tar.gz
| Download URL | astraeadb-0.1.1.tar.gz |
|---|---|
| Size | 15.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f233d66716c03b7fd671b38fcb58c89a12c13a397cbb599c8d0209c8c9bedc16
|
|
BLAKE2b-256 checksum How to use checksums |
3d01e8136b8a889f299cf9ffb1bd4fa86061c5a5e31543a437630a7faf48fa68
|
| 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 Aug 2, 2026.
Transparency logRelease files / astraeadb-0.1.1-py3-none-any.whl
| Download URL | astraeadb-0.1.1-py3-none-any.whl |
|---|---|
| Size | 14.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b765121d7f278663c007b41aeca5c601c6edf71477f693f89438d83bf0d2b1e4
|
|
BLAKE2b-256 checksum How to use checksums |
b1454b539dac147d8e57aa7ef0246c214ba0bed7a0a6552e032745f6517f612c
|
| 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 Aug 2, 2026.
Transparency log